結果

問題 No.431 死亡フラグ
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2016-10-30 23:50:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 3,635 ms
コンパイル使用メモリ 71,112 KB
実行使用メモリ 56,068 KB
最終ジャッジ日時 2023-08-16 11:29:02
合計ジャッジ時間 5,274 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,584 KB
testcase_01 AC 120 ms
55,676 KB
testcase_02 AC 121 ms
55,672 KB
testcase_03 AC 120 ms
55,584 KB
testcase_04 AC 121 ms
55,596 KB
testcase_05 AC 119 ms
55,596 KB
testcase_06 AC 129 ms
55,828 KB
testcase_07 AC 122 ms
55,740 KB
testcase_08 AC 122 ms
55,644 KB
testcase_09 AC 122 ms
56,068 KB
testcase_10 AC 122 ms
55,612 KB
testcase_11 AC 121 ms
55,840 KB
testcase_12 AC 121 ms
55,660 KB
testcase_13 AC 120 ms
55,816 KB
testcase_14 AC 130 ms
55,588 KB
testcase_15 AC 130 ms
55,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int D1 = sc.nextInt(), D2 = sc.nextInt(),
    		D3 = sc.nextInt(), S = sc.nextInt();
    	
    	if(S == 1) {
    		System.out.println("SURVIVED");
    	} else {
    		if((D1 + D2 + D3) < 2)	System.out.println("SURVIVED");
    		else					System.out.println("DEAD");
    	}
    }
}
0