結果

問題 No.431 死亡フラグ
ユーザー kenji_shioyakenji_shioya
提出日時 2016-10-22 19:51:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 3,550 ms
コンパイル使用メモリ 74,640 KB
実行使用メモリ 54,336 KB
最終ジャッジ日時 2024-05-02 22:35:20
合計ジャッジ時間 5,470 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
53,860 KB
testcase_01 AC 115 ms
54,136 KB
testcase_02 AC 106 ms
53,052 KB
testcase_03 AC 118 ms
54,336 KB
testcase_04 AC 105 ms
52,776 KB
testcase_05 AC 105 ms
52,908 KB
testcase_06 AC 113 ms
54,008 KB
testcase_07 AC 109 ms
53,976 KB
testcase_08 AC 110 ms
53,928 KB
testcase_09 AC 118 ms
54,200 KB
testcase_10 AC 124 ms
54,172 KB
testcase_11 AC 123 ms
53,772 KB
testcase_12 AC 103 ms
52,900 KB
testcase_13 AC 114 ms
54,248 KB
testcase_14 AC 112 ms
53,704 KB
testcase_15 AC 100 ms
52,932 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