結果

問題 No.431 死亡フラグ
ユーザー OGNM
提出日時 2016-11-14 12:22:13
言語 Java
(openjdk 23)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 2,966 ms
コンパイル使用メモリ 77,044 KB
実行使用メモリ 41,416 KB
最終ジャッジ日時 2024-11-25 22:16:27
合計ジャッジ時間 5,464 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main_01{
    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 s1 = sc.nextInt();
        int d = d1 + d2 + d3;

        if(d <= 1){
            System.out.println("SURVIVED");
        }else if(d >= 2 && s1 == 1 ){
            System.out.println("SURVIVED");
        }else if(d >= 2 && s1== 0){
            System.out.println("DEAD");
        }
    }
}
0