結果

問題 No.431 死亡フラグ
ユーザー TakaTaka
提出日時 2016-11-01 14:43:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 463 bytes
コンパイル時間 3,184 ms
コンパイル使用メモリ 72,328 KB
実行使用メモリ 55,780 KB
最終ジャッジ日時 2023-08-16 12:13:01
合計ジャッジ時間 6,095 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,740 KB
testcase_01 AC 124 ms
55,752 KB
testcase_02 AC 121 ms
55,268 KB
testcase_03 AC 122 ms
55,532 KB
testcase_04 AC 120 ms
55,492 KB
testcase_05 AC 121 ms
55,260 KB
testcase_06 AC 120 ms
55,628 KB
testcase_07 AC 120 ms
55,520 KB
testcase_08 AC 121 ms
53,512 KB
testcase_09 AC 122 ms
55,636 KB
testcase_10 AC 121 ms
55,636 KB
testcase_11 AC 121 ms
55,260 KB
testcase_12 AC 120 ms
55,524 KB
testcase_13 AC 120 ms
55,640 KB
testcase_14 AC 124 ms
55,780 KB
testcase_15 AC 121 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.Arrays;
import java.math.BigDecimal;

public class a{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int d=sc.nextInt();
		
		if(d==1){
			System.out.println("SURVIVED");
		}else if(a==1&&b==1 || a==1&&c==1 || b==1&&c==1){
			System.out.println("DEAD");
		}else{
			System.out.println("SURVIVED");
		}
    }
}
0