結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー testestesttestestest
提出日時 2015-08-09 14:51:00
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 113 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 23,608 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 07:29:04
合計ジャッジ時間 647 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 0 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:3:8: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration]
 for(;t=getchar()-10;a[t-38]++);
        ^~~~~~~
main.c:3:8: note: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
main.c:1:1:
+#include <stdio.h>
 int main(){
main.c:3:8:
 for(;t=getchar()-10;a[t-38]++);
        ^~~~~~~
main.c:4:28: warning: implicit declaration of function ‘putchar’ [-Wimplicit-function-declaration]
 for(t=10;t--;)for(;a[t]--;)putchar(48+t);
                            ^~~~~~~

ソースコード

diff #

int main(){
int a[10]={},t;
for(;t=getchar()-10;a[t-38]++);
for(t=10;t--;)for(;a[t]--;)putchar(48+t);
return 0;
}
0