結果
| 問題 | No.431 死亡フラグ |
| コンテスト | |
| ユーザー |
FVRChan
|
| 提出日時 | 2017-10-03 00:12:17 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 56 ms / 2,000 ms |
| + 976µs | |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 1,489 ms |
| コンパイル使用メモリ | 86,060 KB |
| 実行使用メモリ | 45,352 KB |
| 最終ジャッジ日時 | 2026-09-23 18:41:59 |
| 合計ジャッジ時間 | 3,866 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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