結果

問題 No.431 死亡フラグ
ユーザー samplelpmas
提出日時 2017-01-14 13:21:23
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 531 bytes
コンパイル時間 2,207 ms
コンパイル使用メモリ 75,608 KB
実行使用メモリ 41,384 KB
最終ジャッジ日時 2024-12-21 12:41:37
合計ジャッジ時間 5,129 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int deadFlag1 = sc.nextInt();
        int deadFlag2 = sc.nextInt();
        int deadFlag3 = sc.nextInt();
        int deadFlagSum = deadFlag1 + deadFlag2 + deadFlag3;

        int survivedFlag = sc.nextInt();

        if (survivedFlag == 1 || deadFlagSum < 2) {
            System.out.println("SURVIVED");
        } else {
            System.out.println("DEAD");
        }

    }

}
0