結果

問題 No.431 死亡フラグ
ユーザー fukuseifukusei
提出日時 2017-05-20 23:04:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 3,387 ms
コンパイル使用メモリ 75,420 KB
実行使用メモリ 57,644 KB
最終ジャッジ日時 2023-10-19 04:16:16
合計ジャッジ時間 6,408 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
57,284 KB
testcase_01 AC 135 ms
57,500 KB
testcase_02 AC 134 ms
57,644 KB
testcase_03 AC 139 ms
55,508 KB
testcase_04 AC 139 ms
57,544 KB
testcase_05 AC 134 ms
57,600 KB
testcase_06 AC 139 ms
57,520 KB
testcase_07 AC 136 ms
57,612 KB
testcase_08 AC 134 ms
57,508 KB
testcase_09 AC 133 ms
57,548 KB
testcase_10 AC 133 ms
57,316 KB
testcase_11 AC 133 ms
57,544 KB
testcase_12 AC 133 ms
57,568 KB
testcase_13 AC 135 ms
57,520 KB
testcase_14 AC 136 ms
57,476 KB
testcase_15 AC 136 ms
57,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*; 

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