結果

問題 No.431 死亡フラグ
ユーザー YamaKasaYamaKasa
提出日時 2018-05-06 00:41:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 431 bytes
コンパイル時間 1,867 ms
コンパイル使用メモリ 71,008 KB
実行使用メモリ 56,172 KB
最終ジャッジ日時 2023-09-10 10:40:12
合計ジャッジ時間 5,400 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,956 KB
testcase_01 AC 127 ms
55,888 KB
testcase_02 AC 124 ms
55,932 KB
testcase_03 AC 125 ms
55,796 KB
testcase_04 AC 126 ms
55,752 KB
testcase_05 AC 125 ms
55,508 KB
testcase_06 AC 126 ms
55,516 KB
testcase_07 AC 126 ms
55,932 KB
testcase_08 AC 125 ms
55,740 KB
testcase_09 AC 125 ms
55,796 KB
testcase_10 AC 126 ms
55,580 KB
testcase_11 AC 121 ms
56,172 KB
testcase_12 AC 120 ms
56,116 KB
testcase_13 AC 120 ms
56,080 KB
testcase_14 AC 119 ms
56,144 KB
testcase_15 AC 120 ms
56,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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