結果

問題 No.431 死亡フラグ
ユーザー ryunocchiryunocchi
提出日時 2019-03-22 16:36:11
言語 Java19
(openjdk 21)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 589 bytes
コンパイル時間 4,120 ms
コンパイル使用メモリ 74,552 KB
実行使用メモリ 57,672 KB
最終ジャッジ日時 2023-10-19 06:07:16
合計ジャッジ時間 5,550 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,432 KB
testcase_01 AC 135 ms
57,460 KB
testcase_02 AC 136 ms
57,480 KB
testcase_03 AC 135 ms
57,432 KB
testcase_04 AC 135 ms
57,476 KB
testcase_05 AC 136 ms
57,452 KB
testcase_06 AC 133 ms
57,548 KB
testcase_07 AC 135 ms
57,552 KB
testcase_08 AC 137 ms
57,424 KB
testcase_09 AC 134 ms
57,448 KB
testcase_10 AC 138 ms
57,460 KB
testcase_11 AC 135 ms
57,524 KB
testcase_12 AC 138 ms
57,464 KB
testcase_13 AC 136 ms
57,472 KB
testcase_14 AC 135 ms
57,424 KB
testcase_15 AC 136 ms
57,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int flag1 = sc.nextInt();
        int flag2 = sc.nextInt();
        int flag3 = sc.nextInt();
        int flag4 = sc.nextInt();
        
        int sum = flag1 + flag2 + flag3;
        
        if(sum > 1){
            if(flag4 == 1){
                System.out.println("SURVIVED");
            }else{
                System.out.println("DEAD");
            }
        }else{
            System.out.println("SURVIVED");
        }
            
    }
}
0