結果
問題 | No.431 死亡フラグ |
ユーザー |
![]() |
提出日時 | 2016-10-18 11:32:31 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 2,000 ms |
コード長 | 520 bytes |
コンパイル時間 | 2,175 ms |
コンパイル使用メモリ | 74,412 KB |
実行使用メモリ | 41,372 KB |
最終ジャッジ日時 | 2024-11-22 12:10:16 |
合計ジャッジ時間 | 5,069 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
import java.util.*; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws Exception { int d = 0; for (int i=0;i<3;i++) { if (sc.nextInt() == 1) d++; } int s = sc.nextInt(); if (s > 0) { System.out.println("SURVIVED"); } else if (d > 1) { System.out.println("DEAD"); } else { System.out.println("SURVIVED"); } } }