結果
問題 | No.369 足し間違い |
ユーザー | 👑 testestest |
提出日時 | 2016-05-13 22:21:37 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 76 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 19,072 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 16:39:26 |
合計ジャッジ時間 | 517 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 0 ms
5,248 KB |
testcase_02 | AC | 0 ms
5,248 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
コンパイルメッセージ
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(&j);~scanf("%d",&i);s+=j)j=i; | ^~~~ main.c:3:15: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | for(gets(&j);~scanf("%d",&i);s+=j)j=i; | ^~~~~ 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(&j);~scanf("%d",&i);s+=j)j=i; | ^~~~~ 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/ccNk0ubS.o: in function `main': main.c:(.text.startup+0x22): 警告: the `gets' function is dangerous and should not be used.
ソースコード
i,j,s; main(){ for(gets(&j);~scanf("%d",&i);s+=j)j=i; i=!printf("%d",s-j); }