結果

問題 No.431 死亡フラグ
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-03-13 22:46:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 586 bytes
コンパイル時間 2,414 ms
コンパイル使用メモリ 72,360 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2023-09-12 12:16:23
合計ジャッジ時間 5,557 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,620 KB
testcase_01 AC 127 ms
55,840 KB
testcase_02 AC 127 ms
55,868 KB
testcase_03 AC 126 ms
55,780 KB
testcase_04 AC 127 ms
56,032 KB
testcase_05 AC 127 ms
55,968 KB
testcase_06 AC 127 ms
55,548 KB
testcase_07 AC 125 ms
55,532 KB
testcase_08 AC 125 ms
55,880 KB
testcase_09 AC 126 ms
53,684 KB
testcase_10 AC 127 ms
55,652 KB
testcase_11 AC 127 ms
55,964 KB
testcase_12 AC 127 ms
55,648 KB
testcase_13 AC 126 ms
55,892 KB
testcase_14 AC 126 ms
55,672 KB
testcase_15 AC 127 ms
55,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int d1 = in.nextInt();
        int d2 = in.nextInt();
        int d3 = in.nextInt();
        int s = in.nextInt();

        String ans = "";

        if(s == 1) {
            ans = "SURVIVED";
        } else {
            if(d1 + d2 + d3 >= 2) ans = "DEAD";
            else ans = "SURVIVED";
        }

        System.out.println(ans);

        in.close();
    }
}
0