結果

問題 No.431 死亡フラグ
ユーザー jimanojimano
提出日時 2018-01-13 17:21:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 3,203 ms
コンパイル使用メモリ 73,124 KB
実行使用メモリ 56,188 KB
最終ジャッジ日時 2023-08-25 15:50:34
合計ジャッジ時間 6,154 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,816 KB
testcase_01 AC 124 ms
56,092 KB
testcase_02 AC 124 ms
55,668 KB
testcase_03 AC 122 ms
55,580 KB
testcase_04 AC 125 ms
55,664 KB
testcase_05 AC 123 ms
55,780 KB
testcase_06 AC 125 ms
56,188 KB
testcase_07 AC 127 ms
55,664 KB
testcase_08 AC 125 ms
55,848 KB
testcase_09 AC 125 ms
55,644 KB
testcase_10 AC 124 ms
55,932 KB
testcase_11 AC 124 ms
55,680 KB
testcase_12 AC 123 ms
55,856 KB
testcase_13 AC 120 ms
55,568 KB
testcase_14 AC 121 ms
55,428 KB
testcase_15 AC 123 ms
55,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.util.Scanner;

public class No0431 {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int d1 = sc.nextInt();
			int d2 = sc.nextInt();
			int d3 = sc.nextInt();
			int d = d1 + d2 + d3;
			int S = sc.nextInt();

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