結果

問題 No.431 死亡フラグ
ユーザー misk703misk703
提出日時 2018-04-27 13:22:52
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 3,384 ms
コンパイル使用メモリ 72,420 KB
実行使用メモリ 57,900 KB
最終ジャッジ日時 2023-09-10 06:07:57
合計ジャッジ時間 6,385 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 120 ms
55,864 KB
testcase_04 WA -
testcase_05 AC 120 ms
55,956 KB
testcase_06 AC 119 ms
55,612 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 123 ms
55,704 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A{
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        int d[] = new int[4];
        int cut=0;
        
        for(int i=0;i<4;i++){
            d[i] = Integer.parseInt(s.next());
            if(d[i] == 1){
                cut++;
            }
            if(i == 3 && d[3] == 1){
                System.out.println("SURVIVED");
                break;
            }
            if(cut>=2){
                System.out.println("DEAD");
                break;
            }
        }
        System.out.println("SURVIVED");
        
    }
}
0