結果

問題 No.431 死亡フラグ
ユーザー YamaKasa
提出日時 2018-05-06 00:41:09
言語 Java
(openjdk 23)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 431 bytes
コンパイル時間 2,093 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 41,432 KB
最終ジャッジ日時 2024-06-28 02:03:28
合計ジャッジ時間 5,012 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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