結果

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

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int sibou = 0;
		int seizon = 0;
		for (int i=0; i<3; i++) {
			if (sc.nextInt() == 1) sibou++;
		}
		if (sc.nextInt() == 1) seizon++;
		
		if (seizon == 1) System.out.println("SURVIVED");
		else {
			if (sibou >= 2) System.out.println("DEAD");
			else System.out.println("SURVIVED");
		}
		
		
	}
}
0