結果
| 問題 | No.289 数字を全て足そう |
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2018-04-08 18:35:27 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 1,000 ms |
| コード長 | 57 bytes |
| 記録 | |
| コンパイル時間 | 490 ms |
| コンパイル使用メモリ | 27,264 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 20:23:32 |
| 合計ジャッジ時間 | 1,605 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
| ^
main.c:1:1: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:3: warning: return type defaults to 'int' [-Wimplicit-int]
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
| ^~~~
main.c: In function 'main':
main.c:1:3: warning: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:16: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
| ^~~~
main.c:1:33: warning: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
| ^~~~
main.c:1:42: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
main.c:1:42: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
1 | x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
| ^~~~~~
main.c:1:42: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
x;main(c){for(;read(0,&c,1);)x+=atoi(&c);printf("%d",x);}
%20