結果

問題 No.431 死亡フラグ
ユーザー kenji_shioyakenji_shioya
提出日時 2016-10-22 19:51:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 4,331 ms
コンパイル使用メモリ 71,924 KB
実行使用メモリ 56,180 KB
最終ジャッジ日時 2023-08-15 11:05:17
合計ジャッジ時間 6,445 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,656 KB
testcase_01 AC 122 ms
55,724 KB
testcase_02 AC 123 ms
55,560 KB
testcase_03 AC 125 ms
55,816 KB
testcase_04 AC 123 ms
55,740 KB
testcase_05 AC 125 ms
55,912 KB
testcase_06 AC 125 ms
55,960 KB
testcase_07 AC 124 ms
55,828 KB
testcase_08 AC 124 ms
55,980 KB
testcase_09 AC 124 ms
55,716 KB
testcase_10 AC 124 ms
56,044 KB
testcase_11 AC 127 ms
55,980 KB
testcase_12 AC 124 ms
56,080 KB
testcase_13 AC 125 ms
56,040 KB
testcase_14 AC 123 ms
53,804 KB
testcase_15 AC 122 ms
56,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise155 {
  public static void main(String[] args){
    String sStr = "SURVIVED";
    String dStr = "DEAD";
    Scanner sc = new Scanner(System.in);

    int count = 0;
    for(int i = 0; i < 3; i++){
      if(sc.nextInt() == 1){
        count++;
      }
    }
    int s = sc.nextInt();
    if(s == 1){
      System.out.println(sStr);
    }else{
      if(count < 2){
        System.out.println(sStr);
      }else{
        System.out.println(dStr);
      }
    }
  }
}
0