結果
問題 |
No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
👑 ![]() |
提出日時 | 2017-03-16 19:07:22 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 41 ms / 3,000 ms |
コード長 | 68 bytes |
コンパイル時間 | 917 ms |
コンパイル使用メモリ | 27,392 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 15:54:46 |
合計ジャッジ時間 | 2,003 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
コンパイルメッセージ
main.c:1:10: warning: return type defaults to 'int' [-Wimplicit-int] 1 | long s,n;main(i){for(;~scanf("%ld",&n);i=0)s+=n*!i;printf("%ld",s);} | ^~~~ main.c: In function 'main': main.c:1:10: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:24: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | long s,n;main(i){for(;~scanf("%ld",&n);i=0)s+=n*!i;printf("%ld",s);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | long s,n;main(i){for(;~scanf("%ld",&n);i=0)s+=n*!i;printf("%ld",s);} main.c:1:24: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | long s,n;main(i){for(;~scanf("%ld",&n);i=0)s+=n*!i;printf("%ld",s);} | ^~~~~ main.c:1:24: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:52: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | long s,n;main(i){for(;~scanf("%ld",&n);i=0)s+=n*!i;printf("%ld",s);} | ^~~~~~ main.c:1:52: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:52: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:52: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
long s,n;main(i){for(;~scanf("%ld",&n);i=0)s+=n*!i;printf("%ld",s);}