結果
問題 | No.431 死亡フラグ |
ユーザー | checkcheck12ch1 |
提出日時 | 2016-11-17 17:03:15 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 19,072 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 03:02:14 |
合計ジャッジ時間 | 753 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
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 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 0 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 0 ms
5,248 KB |
testcase_11 | AC | 0 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 1 ms
5,248 KB |
testcase_14 | AC | 1 ms
5,248 KB |
testcase_15 | AC | 0 ms
5,248 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:3:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | scanf("%d%d%d%d", &df1, &df2, &df3, &sf); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | int main(void){ main.c:3:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 3 | scanf("%d%d%d%d", &df1, &df2, &df3, &sf); | ^~~~~ main.c:3:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:6:17: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 6 | printf("SURVIVED\n"); | ^~~~~~ main.c:6:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:6:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:6:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:9:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 9 | printf("SURVIVED\n"); | ^~~~~~ main.c:9:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:12:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 12 | printf("DEAD\n"); | ^~~~~~ main.c:12:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
int main(void){ int df1, df2, df3, sf; scanf("%d%d%d%d", &df1, &df2, &df3, &sf); if(sf != 0) { printf("SURVIVED\n"); } else if((df1+df2+df3) < 2) { printf("SURVIVED\n"); } else { printf("DEAD\n"); } return 0; }