結果

問題 No.467 隠されていたゲーム
ユーザー suppy193suppy193
提出日時 2017-01-11 12:49:45
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,252 KB
実行使用メモリ 15,372 KB
最終ジャッジ日時 2023-08-23 07:39:23
合計ジャッジ時間 3,490 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,048 KB
testcase_01 AC 80 ms
15,092 KB
testcase_02 AC 82 ms
15,304 KB
testcase_03 AC 80 ms
15,036 KB
testcase_04 WA -
testcase_05 AC 81 ms
15,156 KB
testcase_06 WA -
testcase_07 AC 81 ms
15,120 KB
testcase_08 AC 79 ms
15,044 KB
testcase_09 WA -
testcase_10 AC 79 ms
15,260 KB
testcase_11 AC 78 ms
15,176 KB
testcase_12 AC 79 ms
15,292 KB
testcase_13 AC 83 ms
15,140 KB
testcase_14 AC 82 ms
15,264 KB
testcase_15 AC 80 ms
15,024 KB
testcase_16 AC 81 ms
15,096 KB
testcase_17 AC 81 ms
15,156 KB
testcase_18 AC 80 ms
15,136 KB
testcase_19 AC 79 ms
15,256 KB
testcase_20 AC 79 ms
15,128 KB
testcase_21 AC 80 ms
15,332 KB
testcase_22 AC 80 ms
15,332 KB
testcase_23 AC 79 ms
15,092 KB
testcase_24 AC 80 ms
15,284 KB
testcase_25 AC 80 ms
15,300 KB
testcase_26 AC 80 ms
15,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
cheby = gets.strip.split(' ').map(&:to_i)
#p @cheby
goal = gets.strip.split(' ').map(&:to_i).map(&:abs)
#p @goal

if goal == [0, 0]
	p "0"
	exit
end

goal_max = goal.max
cheby_max = cheby.max

if cheby.include?(goal_max)
	p "1"
	exit
end

if goal_max < cheby_max
	p (goal.max.to_f / cheby.max).ceil + 1
else
	p (goal.max.to_f / cheby.max).ceil
end
0