結果

問題 No.431 死亡フラグ
ユーザー shinwisteriashinwisteria
提出日時 2017-03-30 17:41:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 3,305 ms
コンパイル使用メモリ 71,936 KB
実行使用メモリ 56,192 KB
最終ジャッジ日時 2023-09-21 08:44:03
合計ジャッジ時間 6,531 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,796 KB
testcase_01 AC 125 ms
56,144 KB
testcase_02 AC 123 ms
55,532 KB
testcase_03 AC 123 ms
55,872 KB
testcase_04 AC 126 ms
55,820 KB
testcase_05 AC 124 ms
55,732 KB
testcase_06 AC 124 ms
55,856 KB
testcase_07 AC 123 ms
56,180 KB
testcase_08 AC 125 ms
55,952 KB
testcase_09 AC 123 ms
55,804 KB
testcase_10 AC 123 ms
56,192 KB
testcase_11 AC 122 ms
55,868 KB
testcase_12 AC 123 ms
55,980 KB
testcase_13 AC 123 ms
56,060 KB
testcase_14 AC 123 ms
55,992 KB
testcase_15 AC 123 ms
55,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Flag {

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

	}

}
0