結果

問題 No.431 死亡フラグ
ユーザー jiro8719
提出日時 2018-07-20 17:31:08
言語 Ruby
(3.4.1)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-12-26 04:23:44
合計ジャッジ時間 2,375 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

input = gets.split(" ").map{|i|i.to_i}
count = 0
if input[3] == 1
    puts "SURVIVED"
else
    for j in 0..2
        if input[j] == 1
            count += 1
        end
    end
    if count < 2
        puts "SURVIVED"
    else
        puts "DEAD"
    end
end# your code goes here
0