結果
問題 |
No.431 死亡フラグ
|
ユーザー |
![]() |
提出日時 | 2017-05-20 23:04:37 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 136 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 3,506 ms |
コンパイル使用メモリ | 74,936 KB |
実行使用メモリ | 41,504 KB |
最終ジャッジ日時 | 2024-09-19 00:32:00 |
合計ジャッジ時間 | 6,420 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
import java.util.*; public class test { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int sum = 0; for(int i=0; i<3; i++){ int d = sc.nextInt(); if(d == 1){ sum++; } } int s = sc.nextInt(); if(s == 1 || sum < 2 ){ System.out.println("SURVIVED"); } else{ System.out.println("DEAD"); } } }