結果
| 問題 | 
                            No.256 桁の数字を入れ替え (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             zazaboon
                         | 
                    
| 提出日時 | 2015-08-09 00:47:01 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 428 bytes | 
| コンパイル時間 | 143 ms | 
| コンパイル使用メモリ | 21,632 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-18 06:07:52 | 
| 合計ジャッジ時間 | 902 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 RE * 2 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:12:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |         scanf("%s",keta);
      |         ^~~~~~~~~~~~~~~~
            
            ソースコード
#include<stdio.h>
#include<stdlib.h>
#include <string.h> 
int sort(const void*a,const void*b) 
{
	return *(int *)b - *(int *)a;
}
int main (void)
{
	int i,ketasuu=0,keta_int[9999];
	char	keta[9999];
	scanf("%s",keta);
	ketasuu = strlen(keta);
	for(i=0;i<ketasuu;i++)
	{
		keta_int[i]=keta[i];
	}
	qsort((void *)keta_int,ketasuu,sizeof(keta_int[0]),sort);
	for(i=0;i<ketasuu;i++)
	{
		printf("%d",keta_int[i]-48);
	}
	return 0;
}
            
            
            
        
            
zazaboon