結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
41,044 KB
testcase_01 AC 116 ms
39,952 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 132 ms
41,044 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 129 ms
41,308 KB
testcase_09 AC 130 ms
41,048 KB
testcase_10 AC 128 ms
41,064 KB
testcase_11 AC 126 ms
41,052 KB
testcase_12 AC 129 ms
41,296 KB
testcase_13 WA -
testcase_14 AC 131 ms
40,772 KB
testcase_15 AC 119 ms
40,184 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 = m + n + s;
			System.out.println(cntDead == 2 ? "SURVIVED" : "DEAD");
		}
	}
}
0