結果
| 問題 | No.431 死亡フラグ |
| コンテスト | |
| ユーザー |
FVRChan
|
| 提出日時 | 2017-10-03 00:12:17 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 2,021 ms |
| コンパイル使用メモリ | 82,332 KB |
| 実行使用メモリ | 41,468 KB |
| 最終ジャッジ日時 | 2026-05-11 00:42:04 |
| 合計ジャッジ時間 | 3,714 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
import java.util.Scanner;
public class Main{
private static Scanner sc=new Scanner(System.in);
public static void main(String args[])throws Exception{
int s,d[]=new int[3];
for(int i=0;i<d.length;i++)d[i]=sc.nextInt();
s=sc.nextInt();
if(s==1){
System.out.println("SURVIVED");
}else{
int counter=0;
for(int element:d){
if(element==1)counter++;
}
if(counter>=2)System.out.println("DEAD");
else System.out.println("SURVIVED");
}
}
}
FVRChan