結果

問題 No.431 死亡フラグ
ユーザー yuiyui
提出日時 2017-02-20 11:24:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 2,033 ms
コンパイル使用メモリ 72,264 KB
実行使用メモリ 56,172 KB
最終ジャッジ日時 2023-08-28 19:38:29
合計ジャッジ時間 5,009 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,840 KB
testcase_01 AC 123 ms
55,996 KB
testcase_02 AC 124 ms
55,692 KB
testcase_03 AC 124 ms
55,924 KB
testcase_04 AC 125 ms
55,708 KB
testcase_05 AC 124 ms
55,840 KB
testcase_06 AC 125 ms
55,696 KB
testcase_07 AC 126 ms
55,744 KB
testcase_08 AC 124 ms
56,172 KB
testcase_09 AC 126 ms
55,504 KB
testcase_10 AC 124 ms
56,124 KB
testcase_11 AC 125 ms
55,724 KB
testcase_12 AC 125 ms
55,812 KB
testcase_13 AC 124 ms
55,928 KB
testcase_14 AC 124 ms
56,140 KB
testcase_15 AC 123 ms
56,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

    	Scanner sc = new Scanner(System.in);
    	int fl1 = sc.nextInt();
    	int fl2 = sc.nextInt();
    	int fl3 = sc.nextInt();
    	int fl4 = sc.nextInt();
    	int count = fl1+fl2+fl3;

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

    }

}
0