結果

問題 No.431 死亡フラグ
ユーザー darknightdarknight
提出日時 2016-10-14 22:28:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 721 bytes
コンパイル時間 1,973 ms
コンパイル使用メモリ 71,892 KB
実行使用メモリ 56,460 KB
最終ジャッジ日時 2023-08-14 10:58:31
合計ジャッジ時間 4,525 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
55,708 KB
testcase_01 AC 99 ms
55,560 KB
testcase_02 AC 97 ms
55,496 KB
testcase_03 AC 99 ms
55,640 KB
testcase_04 AC 107 ms
55,492 KB
testcase_05 AC 99 ms
55,752 KB
testcase_06 AC 100 ms
55,712 KB
testcase_07 AC 106 ms
55,636 KB
testcase_08 AC 103 ms
55,664 KB
testcase_09 AC 106 ms
55,612 KB
testcase_10 AC 103 ms
56,460 KB
testcase_11 AC 101 ms
55,788 KB
testcase_12 AC 103 ms
55,860 KB
testcase_13 AC 104 ms
55,660 KB
testcase_14 AC 101 ms
55,512 KB
testcase_15 AC 102 ms
55,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 
public class Main {
	public static void main(String[] args) {
 
		Scanner sc  = new Scanner(System.in);

		int o= 0 ,p = 0,q = 0;

int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
int d = Integer.parseInt(sc.next());
//	    int[] test  = new int[100000];
//      char[] c1 = s1.toCharArray();
/*
        while(true){
            test[o] = Integer.parseInt(sc.next());
            o++;
            if(o==s)break;
        }
*/
        if(a==1)o++;
        if(b==1)o++;
        if(c==1)o++;
        if(d==1)o-=5;
        
        if(o>1)System.out.print("DEAD");
        else System.out.print("SURVIVED");
        System.out.println();
	}
}
0