結果
問題 |
No.431 死亡フラグ
|
ユーザー |
|
提出日時 | 2021-03-16 22:21:28 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 575 bytes |
コンパイル時間 | 3,019 ms |
コンパイル使用メモリ | 74,000 KB |
実行使用メモリ | 37,084 KB |
最終ジャッジ日時 | 2024-11-08 17:39:04 |
合計ジャッジ時間 | 4,487 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000431_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String[] x = br.readLine().split(" "); if("1".equals(x[3])) { System.out.println("SURVIVED"); } else { int cnt = 0; for(int i = 0; i < 3; i++) { if("1".equals(x[i])) cnt++; } if(cnt < 2) { System.out.println("SURVIVED"); } else { System.out.println("DEAD"); } } } }