結果

問題 No.431 死亡フラグ
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-13 11:58:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 2,187 ms
コンパイル使用メモリ 74,228 KB
実行使用メモリ 41,628 KB
最終ジャッジ日時 2024-04-28 17:25:24
合計ジャッジ時間 4,923 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 134 ms
41,092 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 132 ms
41,068 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 117 ms
39,868 KB
testcase_08 AC 132 ms
41,384 KB
testcase_09 WA -
testcase_10 AC 131 ms
41,092 KB
testcase_11 AC 131 ms
41,292 KB
testcase_12 AC 134 ms
41,124 KB
testcase_13 WA -
testcase_14 AC 133 ms
41,264 KB
testcase_15 AC 135 ms
41,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int l = sc.nextInt();
		int m = sc.nextInt();
		int n = sc.nextInt();
		int s = sc.nextInt();
		if(s == 1) {
			System.out.println("SURVIVED");
		} else {
			int cntDead = l + m + n;
			System.out.println(cntDead == 2 ? "SURVIVED" : "DEAD");
		}
	}
}
0