結果

問題 No.431 死亡フラグ
ユーザー xcd0xcd0
提出日時 2016-10-22 19:30:09
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 223 bytes
コンパイル時間 54 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-05-02 22:34:37
合計ジャッジ時間 2,230 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 95 ms
12,032 KB
testcase_02 WA -
testcase_03 AC 86 ms
12,160 KB
testcase_04 AC 90 ms
12,160 KB
testcase_05 AC 86 ms
12,160 KB
testcase_06 AC 87 ms
12,032 KB
testcase_07 WA -
testcase_08 AC 92 ms
12,160 KB
testcase_09 WA -
testcase_10 AC 91 ms
12,032 KB
testcase_11 AC 88 ms
12,032 KB
testcase_12 AC 89 ms
12,160 KB
testcase_13 AC 87 ms
12,032 KB
testcase_14 AC 92 ms
11,904 KB
testcase_15 AC 89 ms
12,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! /usr/bin/ruby
## coding: utf-8


f1 = ARGV[0].to_i
f2 = ARGV[1].to_i
f3 = ARGV[2].to_i
s1 = ARGV[3].to_i

df = f1 + f2 + f3

if s1.to_i > 0
  puts "SURVIVED"
elsif df < 2
  puts "SURVIVED"
elsif df >= 2
  puts "DEAD"
end
0