結果

問題 No.431 死亡フラグ
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2016-10-30 23:50:38
言語 Java
(openjdk 23)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 1,991 ms
コンパイル使用メモリ 74,044 KB
実行使用メモリ 54,020 KB
最終ジャッジ日時 2024-11-24 23:53:12
合計ジャッジ時間 4,235 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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