結果

問題 No.431 死亡フラグ
ユーザー FpmpAmpmFpmpAmpm
提出日時 2016-10-17 23:20:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 570 bytes
コンパイル時間 2,429 ms
コンパイル使用メモリ 74,008 KB
実行使用メモリ 41,396 KB
最終ジャッジ日時 2024-05-02 03:23:23
合計ジャッジ時間 6,626 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
41,244 KB
testcase_01 AC 120 ms
39,880 KB
testcase_02 AC 141 ms
41,172 KB
testcase_03 AC 152 ms
41,100 KB
testcase_04 AC 159 ms
41,364 KB
testcase_05 AC 153 ms
41,088 KB
testcase_06 AC 153 ms
41,396 KB
testcase_07 AC 149 ms
41,064 KB
testcase_08 AC 143 ms
41,260 KB
testcase_09 AC 147 ms
41,096 KB
testcase_10 AC 147 ms
40,952 KB
testcase_11 AC 133 ms
41,116 KB
testcase_12 AC 120 ms
39,968 KB
testcase_13 AC 140 ms
41,260 KB
testcase_14 AC 141 ms
41,364 KB
testcase_15 AC 142 ms
41,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
    	Scanner sc = new Scanner(System.in);
    	int d1 = sc.nextInt();
    	int d2 = sc.nextInt();
    	int d3 = sc.nextInt();
    	int s = (0 < sc.nextInt()) ? 0:1;
    	
    	if (1 < (d1 + d2 + d3)*s) {
    		System.out.println("DEAD");
    	} else {
    		System.out.println("SURVIVED");
    	}
	}
}
0