結果
| 問題 |
No.431 死亡フラグ
|
| コンテスト | |
| ユーザー |
FVRChan
|
| 提出日時 | 2017-10-03 00:12:17 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 2,000 ms |
| コード長 | 467 bytes |
| コンパイル時間 | 2,319 ms |
| コンパイル使用メモリ | 74,540 KB |
| 実行使用メモリ | 54,412 KB |
| 最終ジャッジ日時 | 2024-11-15 22:43:22 |
| 合計ジャッジ時間 | 4,637 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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