結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 76 ms
12,160 KB
testcase_02 WA -
testcase_03 AC 73 ms
12,032 KB
testcase_04 AC 76 ms
12,160 KB
testcase_05 AC 82 ms
12,160 KB
testcase_06 AC 83 ms
11,904 KB
testcase_07 WA -
testcase_08 AC 84 ms
12,032 KB
testcase_09 WA -
testcase_10 AC 79 ms
12,032 KB
testcase_11 AC 77 ms
11,904 KB
testcase_12 AC 77 ms
12,160 KB
testcase_13 AC 78 ms
12,160 KB
testcase_14 AC 79 ms
12,160 KB
testcase_15 AC 80 ms
12,160 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