結果

問題 No.431 死亡フラグ
ユーザー kohaku_kohaku
提出日時 2016-11-10 02:03:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 1,807 ms
コンパイル使用メモリ 74,740 KB
実行使用メモリ 54,096 KB
最終ジャッジ日時 2024-11-25 06:09:13
合計ジャッジ時間 4,345 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

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