結果

問題 No.431 死亡フラグ
ユーザー cande398cande398
提出日時 2017-10-08 15:06:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 442 bytes
コンパイル時間 3,243 ms
コンパイル使用メモリ 72,756 KB
実行使用メモリ 56,296 KB
最終ジャッジ日時 2023-08-10 20:10:19
合計ジャッジ時間 6,522 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,520 KB
testcase_01 AC 116 ms
56,092 KB
testcase_02 AC 117 ms
56,296 KB
testcase_03 AC 117 ms
56,112 KB
testcase_04 AC 116 ms
55,660 KB
testcase_05 AC 119 ms
55,944 KB
testcase_06 AC 121 ms
56,152 KB
testcase_07 AC 120 ms
55,916 KB
testcase_08 AC 118 ms
56,140 KB
testcase_09 AC 117 ms
56,000 KB
testcase_10 AC 119 ms
53,716 KB
testcase_11 AC 115 ms
55,984 KB
testcase_12 AC 113 ms
56,116 KB
testcase_13 AC 119 ms
55,780 KB
testcase_14 AC 117 ms
56,096 KB
testcase_15 AC 114 ms
55,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int[] num = new int[4];
    int count = 0;
    for(int i=0;i<4;i++){
      num[i] = sc.nextInt();
      count += num[i];
    }
    if(num[3] == 1){
      System.out.println("SURVIVED");
    }
    else if(count>=2){
      System.out.println("DEAD");
    }
    else{
      System.out.println("SURVIVED");
    }
  }
}
0