結果
問題 | No.264 じゃんけん |
ユーザー | ns6251 |
提出日時 | 2020-02-25 05:31:32 |
言語 | C (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 27,648 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 06:18:32 |
合計ジャッジ時間 | 593 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | RE | - |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | RE | - |
コンパイルメッセージ
main.c: In function 'main': main.c:2:14: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 2 | int n,k; scanf("%d %d", &n, &k); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:2:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 2 | int n,k; scanf("%d %d", &n, &k); | ^~~~~ main.c:2:14: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:6:13: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 6 | printf("Won"); | ^~~~~~ main.c:6:13: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:6:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:6:13: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:9:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 9 | printf("Lost"); | ^~~~~~ main.c:9:13: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:12:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 12 | printf("Drew"); | ^~~~~~ main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:9: warning: 'return' with no value, in function returning non-void 13 | return; | ^~~~~~ main.c:1:5: note: declared here 1 | int main(){ | ^~~~
ソースコード
int main(){ int n,k; scanf("%d %d", &n, &k); int res = n - k; if(res) { if (res == -1 || res == 2) { printf("Won"); } else { printf("Lost"); } } else { printf("Drew"); return; } }