結果

問題 No.431 死亡フラグ
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-10 02:03:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 2,293 ms
コンパイル使用メモリ 77,564 KB
実行使用メモリ 54,296 KB
最終ジャッジ日時 2024-05-04 00:31:06
合計ジャッジ時間 5,406 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
54,296 KB
testcase_01 AC 144 ms
54,280 KB
testcase_02 AC 142 ms
54,040 KB
testcase_03 AC 141 ms
54,000 KB
testcase_04 AC 139 ms
54,292 KB
testcase_05 AC 136 ms
54,136 KB
testcase_06 AC 136 ms
54,216 KB
testcase_07 AC 140 ms
54,048 KB
testcase_08 AC 140 ms
54,088 KB
testcase_09 AC 141 ms
54,004 KB
testcase_10 AC 140 ms
54,076 KB
testcase_11 AC 142 ms
54,180 KB
testcase_12 AC 137 ms
53,908 KB
testcase_13 AC 140 ms
54,264 KB
testcase_14 AC 141 ms
54,168 KB
testcase_15 AC 142 ms
53,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int D1 = sc.nextInt();
        int D2 = sc.nextInt();
        int D3 = sc.nextInt();
        int n = D1 + D2 + D3;
        int S = sc.nextInt();
        
        if(S==1){
            System.out.println("SURVIVED");
        }else if(n<=1){
            System.out.println("SURVIVED");
        }else{
            System.out.println("DEAD");
        }
    }
}
0