結果

問題 No.431 死亡フラグ
ユーザー OGNMOGNM
提出日時 2016-11-14 12:22:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 4,278 ms
コンパイル使用メモリ 72,416 KB
実行使用メモリ 56,340 KB
最終ジャッジ日時 2023-08-17 04:37:15
合計ジャッジ時間 6,074 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,320 KB
testcase_01 AC 124 ms
56,056 KB
testcase_02 AC 121 ms
56,340 KB
testcase_03 AC 124 ms
56,040 KB
testcase_04 AC 125 ms
55,844 KB
testcase_05 AC 127 ms
56,096 KB
testcase_06 AC 126 ms
55,948 KB
testcase_07 AC 126 ms
55,844 KB
testcase_08 AC 127 ms
55,580 KB
testcase_09 AC 126 ms
56,084 KB
testcase_10 AC 126 ms
55,544 KB
testcase_11 AC 125 ms
55,480 KB
testcase_12 AC 126 ms
56,108 KB
testcase_13 AC 129 ms
56,048 KB
testcase_14 AC 124 ms
55,832 KB
testcase_15 AC 124 ms
56,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main_01{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int d1 = sc.nextInt();
        int d2 = sc.nextInt();
        int d3 = sc.nextInt();
        int s1 = sc.nextInt();
        int d = d1 + d2 + d3;

        if(d <= 1){
            System.out.println("SURVIVED");
        }else if(d >= 2 && s1 == 1 ){
            System.out.println("SURVIVED");
        }else if(d >= 2 && s1== 0){
            System.out.println("DEAD");
        }
    }
}
0