結果

問題 No.431 死亡フラグ
ユーザー FpmpAmpmFpmpAmpm
提出日時 2016-10-17 23:20:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 570 bytes
コンパイル時間 4,830 ms
コンパイル使用メモリ 70,576 KB
実行使用メモリ 40,292 KB
最終ジャッジ日時 2023-08-14 15:17:40
合計ジャッジ時間 7,448 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
39,144 KB
testcase_01 AC 99 ms
39,092 KB
testcase_02 AC 104 ms
39,296 KB
testcase_03 AC 101 ms
39,472 KB
testcase_04 AC 102 ms
39,200 KB
testcase_05 AC 101 ms
39,272 KB
testcase_06 AC 102 ms
39,112 KB
testcase_07 AC 99 ms
39,532 KB
testcase_08 AC 102 ms
38,952 KB
testcase_09 AC 102 ms
40,292 KB
testcase_10 AC 103 ms
39,664 KB
testcase_11 AC 102 ms
39,392 KB
testcase_12 AC 101 ms
39,336 KB
testcase_13 AC 99 ms
39,860 KB
testcase_14 AC 102 ms
39,992 KB
testcase_15 AC 102 ms
39,632 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