結果

問題 No.467 隠されていたゲーム
ユーザー wotsushiwotsushi
提出日時 2017-03-14 20:56:41
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,248 KB
実行使用メモリ 15,384 KB
最終ジャッジ日時 2023-09-12 12:22:36
合計ジャッジ時間 3,840 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,160 KB
testcase_01 AC 81 ms
15,176 KB
testcase_02 AC 79 ms
15,036 KB
testcase_03 AC 79 ms
15,172 KB
testcase_04 AC 78 ms
15,144 KB
testcase_05 WA -
testcase_06 AC 79 ms
15,080 KB
testcase_07 WA -
testcase_08 AC 77 ms
15,240 KB
testcase_09 WA -
testcase_10 AC 78 ms
15,236 KB
testcase_11 AC 77 ms
15,224 KB
testcase_12 AC 80 ms
15,144 KB
testcase_13 AC 78 ms
15,260 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 81 ms
15,332 KB
testcase_18 AC 80 ms
15,240 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 79 ms
15,184 KB
testcase_23 AC 78 ms
15,248 KB
testcase_24 AC 79 ms
15,020 KB
testcase_25 AC 79 ms
15,384 KB
testcase_26 AC 78 ms
15,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
d = gets.split.map(&:to_i)
x, y = gets.split.map(&:to_i)
ans = if d.any? {|z| z == x || z == y}
        1
      elsif [x, y].max < d.max
        2
      else
        [x, y].max.fdiv(d.max).ceil
      end
puts ans
0