結果

問題 No.431 死亡フラグ
ユーザー seaside0002
提出日時 2019-12-23 20:03:10
言語 PHP
(843.2)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 752 bytes
コンパイル時間 4,575 ms
コンパイル使用メモリ 31,892 KB
実行使用メモリ 31,368 KB
最終ジャッジ日時 2024-09-18 22:30:49
合計ジャッジ時間 6,048 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($flag1, $flag2, $flag3, $flag4) = explode(" ", trim(fgets(STDIN)));
 
$code = "0b".$flag1.$flag2.$flag3.$flag4;
 
$ans = seizonKakunin($code);
 
echo $ans;
  
function seizonKakunin($code): String{
        switch (bindec($code)) {
                case 0 :
                case 1 :
                case 2 :
                case 3 :
                case 4 :
                case 5 :
                case 7 :
                case 8 :
                case 9 :
                case 11 :
                case 13 :
                case 15 :
                        return "SURVIVED";
 
                case 6 :
                case 10 :
                case 12 :
                case 14 :
                        return "DEAD"; 
                }
}
0