結果

問題 No.431 死亡フラグ
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 17:03:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 1,870 ms
コンパイル使用メモリ 71,240 KB
実行使用メモリ 57,916 KB
最終ジャッジ日時 2023-10-11 11:42:40
合計ジャッジ時間 4,827 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,364 KB
testcase_01 AC 122 ms
55,900 KB
testcase_02 AC 122 ms
56,132 KB
testcase_03 AC 123 ms
56,072 KB
testcase_04 AC 122 ms
56,132 KB
testcase_05 AC 123 ms
56,208 KB
testcase_06 AC 122 ms
55,908 KB
testcase_07 AC 124 ms
56,340 KB
testcase_08 AC 124 ms
56,108 KB
testcase_09 AC 123 ms
56,128 KB
testcase_10 AC 123 ms
56,392 KB
testcase_11 AC 123 ms
56,272 KB
testcase_12 AC 119 ms
54,832 KB
testcase_13 AC 123 ms
55,968 KB
testcase_14 AC 122 ms
57,916 KB
testcase_15 AC 123 ms
56,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int sibou = 0;
		int seizon = 0;
		for (int i=0; i<3; i++) {
			if (sc.nextInt() == 1) sibou++;
		}
		if (sc.nextInt() == 1) seizon++;
		
		if (seizon == 1) System.out.println("SURVIVED");
		else {
			if (sibou >= 2) System.out.println("DEAD");
			else System.out.println("SURVIVED");
		}
		
		
	}
}
0