結果
問題 | No.431 死亡フラグ |
ユーザー | misk703 |
提出日時 | 2018-04-27 13:21:03 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 577 bytes |
コンパイル時間 | 6,643 ms |
コンパイル使用メモリ | 72,172 KB |
実行使用メモリ | 56,068 KB |
最終ジャッジ日時 | 2023-09-10 06:07:41 |
合計ジャッジ時間 | 6,823 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 121 ms
55,752 KB |
testcase_04 | WA | - |
testcase_05 | AC | 120 ms
55,692 KB |
testcase_06 | AC | 120 ms
55,592 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 122 ms
55,740 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
ソースコード
import java.util.Scanner; public class A{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int d[] = new int[4]; int cut=0; for(int i=0;i<4;i++){ d[i] = Integer.parseInt(s.next()); if(d[i] == 1){ cut++; } if(i == 3 && d[3] == 1){ System.out.println("SURVIVED"); } if(cut>=2){ System.out.println("DEAD"); } } System.out.println("SURVIVED"); } }