結果

問題 No.431 死亡フラグ
ユーザー yuma_shobon1108
提出日時 2016-11-10 18:13:25
言語 Java
(openjdk 23)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 1,980 ms
コンパイル使用メモリ 73,848 KB
実行使用メモリ 54,188 KB
最終ジャッジ日時 2024-11-25 07:26:19
合計ジャッジ時間 4,652 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Question431
{
	public static void main(String[] args)
	{
	
		Scanner scan = new Scanner(System.in);
		
		int flg[] = new int[4];
		
		for(int i=0; i<4; i++){
			flg[i] = scan.nextInt();
		}
		
		int judge = 0;
		for(int i=0; i<3; i++){
			judge += flg[i];
		}
		
		if(flg[3] == 1 || judge < 2){
			System.out.println("SURVIVED");
		}
		else{
			System.out.println("DEAD");
		}
	}
}
0