結果

問題 No.431 死亡フラグ
ユーザー Mcpu3Mcpu3
提出日時 2018-06-22 02:28:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 1,909 ms
コンパイル使用メモリ 72,132 KB
実行使用メモリ 56,284 KB
最終ジャッジ日時 2023-09-13 07:49:55
合計ジャッジ時間 4,856 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,988 KB
testcase_01 AC 127 ms
55,956 KB
testcase_02 AC 119 ms
55,864 KB
testcase_03 AC 121 ms
55,948 KB
testcase_04 AC 121 ms
55,848 KB
testcase_05 AC 121 ms
55,444 KB
testcase_06 AC 119 ms
55,876 KB
testcase_07 AC 120 ms
56,284 KB
testcase_08 AC 122 ms
56,080 KB
testcase_09 AC 122 ms
56,000 KB
testcase_10 AC 121 ms
55,488 KB
testcase_11 AC 122 ms
56,236 KB
testcase_12 AC 121 ms
55,648 KB
testcase_13 AC 121 ms
56,000 KB
testcase_14 AC 122 ms
55,740 KB
testcase_15 AC 121 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no431{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int d[]=new int[3],s,a=0,i;
		d[0]=stdIn.nextInt();
		d[1]=stdIn.nextInt();
		d[2]=stdIn.nextInt();
		s=stdIn.nextInt();
		for(i=0;i<3;i++) if(d[i]==1) a++;
		if(s==1) System.out.print("SURVIVED");
		else if(a>=2) System.out.print("DEAD");
		else System.out.print("SURVIVED");
	}
}
0