結果
問題 |
No.431 死亡フラグ
|
ユーザー |
![]() |
提出日時 | 2017-10-13 11:57:24 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 382 bytes |
コンパイル時間 | 2,323 ms |
コンパイル使用メモリ | 74,168 KB |
実行使用メモリ | 41,528 KB |
最終ジャッジ日時 | 2024-11-17 11:19:30 |
合計ジャッジ時間 | 5,218 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 6 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int m = sc.nextInt(); int n = sc.nextInt(); int s = sc.nextInt(); if(s == 1) { System.out.println("SURVIVED"); } else { int cntDead = m + n + s; System.out.println(cntDead == 2 ? "SURVIVED" : "DEAD"); } } }