結果
問題 | No.369 足し間違い |
ユーザー | 👑 testestest |
提出日時 | 2016-05-13 22:22:28 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 76 bytes |
コンパイル時間 | 476 ms |
コンパイル使用メモリ | 19,072 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 16:44:18 |
合計ジャッジ時間 | 724 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 2 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 2 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | i,j,s; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | i,j,s; | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | i,j,s; | ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function ‘main’: main.c:3:5: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 3 | for(gets(&i);~scanf("%d",&i);j=i)s+=j; | ^~~~ main.c:3:15: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | for(gets(&i);~scanf("%d",&i);j=i)s+=j; | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | i,j,s; main.c:3:15: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 3 | for(gets(&i);~scanf("%d",&i);j=i)s+=j; | ^~~~~ main.c:3:15: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:4:4: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 4 | i=!printf("%d",s-j); | ^~~~~~ main.c:4:4: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:4:4: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:4:4: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ /usr/bin/ld: /tmp/cc6mfqVj.o: in function `main': main.c:(.text.startup+0x1e): 警告: the `gets' function is dangerous and should not be used.
ソースコード
i,j,s; main(){ for(gets(&i);~scanf("%d",&i);j=i)s+=j; i=!printf("%d",s-j); }