結果

問題 No.431 死亡フラグ
ユーザー tsunabit
提出日時 2018-06-30 16:40:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 3,745 ms
コンパイル使用メモリ 75,356 KB
実行使用メモリ 54,364 KB
最終ジャッジ日時 2024-07-01 00:57:20
合計ジャッジ時間 6,135 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.Stream;


public class No431 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
		int d =sc.nextInt() + sc.nextInt() + sc.nextInt(), s = sc.nextInt();
		if(s == 1) {
				System.out.println("SURVIVED");
		}else if(d > 1) {
				System.out.println("DEAD");
		}else {
				System.out.println("SURVIVED");
		}
	}
}
0