結果

問題 No.431 死亡フラグ
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2016-10-30 23:50:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 2,172 ms
コンパイル使用メモリ 74,244 KB
実行使用メモリ 41,768 KB
最終ジャッジ日時 2024-05-03 19:58:37
合計ジャッジ時間 5,074 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,696 KB
testcase_01 AC 130 ms
41,592 KB
testcase_02 AC 130 ms
41,680 KB
testcase_03 AC 131 ms
41,768 KB
testcase_04 AC 128 ms
41,332 KB
testcase_05 AC 140 ms
41,296 KB
testcase_06 AC 130 ms
41,320 KB
testcase_07 AC 128 ms
41,376 KB
testcase_08 AC 136 ms
41,288 KB
testcase_09 AC 131 ms
41,164 KB
testcase_10 AC 130 ms
41,508 KB
testcase_11 AC 132 ms
41,432 KB
testcase_12 AC 129 ms
41,516 KB
testcase_13 AC 127 ms
41,160 KB
testcase_14 AC 131 ms
41,276 KB
testcase_15 AC 131 ms
41,288 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