結果

問題 No.431 死亡フラグ
ユーザー poopi_pokepoopi_poke
提出日時 2016-11-25 15:21:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 3,494 ms
コンパイル使用メモリ 74,352 KB
実行使用メモリ 41,448 KB
最終ジャッジ日時 2024-05-05 13:26:02
合計ジャッジ時間 5,616 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,448 KB
testcase_01 AC 101 ms
40,568 KB
testcase_02 AC 100 ms
40,276 KB
testcase_03 AC 103 ms
40,444 KB
testcase_04 AC 115 ms
41,384 KB
testcase_05 AC 99 ms
40,424 KB
testcase_06 AC 103 ms
40,268 KB
testcase_07 AC 109 ms
41,108 KB
testcase_08 AC 112 ms
41,192 KB
testcase_09 AC 108 ms
40,228 KB
testcase_10 AC 102 ms
39,920 KB
testcase_11 AC 107 ms
40,996 KB
testcase_12 AC 99 ms
41,212 KB
testcase_13 AC 109 ms
41,172 KB
testcase_14 AC 98 ms
39,920 KB
testcase_15 AC 98 ms
41,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class A{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int a[]=new int[4];
		int b=0;
		for(int i=0; i<a.length; i++){
			a[i]=sc.nextInt();
			b+=a[i];
		}
		System.out.println(hanntei(a[3],b));
	}
	
	public static String hanntei(int a,int b){
		if((a==1)||(a!=1&&b<2)){
			return "SURVIVED";
		}else{
			return "DEAD";
		}
	}
}
0