結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
|
提出日時 | 2017-10-31 14:03:05 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 79 bytes |
コンパイル時間 | 128 ms |
コンパイル使用メモリ | 28,288 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 10:44:58 |
合計ジャッジ時間 | 890 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 16 WA * 1 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:3: warning: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} | ^ main.c:1:5: warning: return type defaults to 'int' [-Wimplicit-int] 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} | ^~~~ main.c: In function 'main': main.c:1:5: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:5: warning: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:21: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} | ^~~~~ main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:56: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");} | ^~~~ main.c:1:56: note: include '<stdio.h>' or provide a declaration of 'puts'
ソースコード
s,t;main(i,a){for(;~scanf("%d",&a);)--i&&(s+=a,t+=a>1);puts(s%2&&t<2?"A":"B");}