結果

問題 No.467 隠されていたゲーム
ユーザー compass19compass19
提出日時 2016-12-23 13:36:19
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-10-04 16:22:52
合計ジャッジ時間 1,699 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import fabs
n = input()
f = lambda x: fabs(int(x))
d_list = list(map(int, input().split()))
gx, gy = map(f, input().split())

# レアケース
if gx == gy == 0:
	print(0); exit()
if max(gx, gy) in d_list:
	print(1); exit()

count = max(gx, gy) / max(d_list)

if count - int(count) == 0:
	print(int(count))
elif count >= 1:
	print(int(count) + 1)
else:
	print(int(count) + 2)
0