結果

問題 No.467 隠されていたゲーム
ユーザー NoaSaberNoaSaber
提出日時 2021-03-11 15:24:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 54,052 KB
最終ジャッジ日時 2024-04-21 05:20:22
合計ジャッジ時間 2,235 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,724 KB
testcase_01 AC 42 ms
52,688 KB
testcase_02 AC 43 ms
53,308 KB
testcase_03 AC 44 ms
52,612 KB
testcase_04 AC 44 ms
52,196 KB
testcase_05 AC 45 ms
53,356 KB
testcase_06 AC 43 ms
53,496 KB
testcase_07 AC 44 ms
52,196 KB
testcase_08 AC 44 ms
52,776 KB
testcase_09 AC 46 ms
53,084 KB
testcase_10 AC 42 ms
53,360 KB
testcase_11 AC 42 ms
52,244 KB
testcase_12 AC 43 ms
53,668 KB
testcase_13 AC 43 ms
53,024 KB
testcase_14 AC 41 ms
52,716 KB
testcase_15 AC 41 ms
53,000 KB
testcase_16 AC 43 ms
53,084 KB
testcase_17 AC 40 ms
52,652 KB
testcase_18 AC 40 ms
52,736 KB
testcase_19 AC 37 ms
53,880 KB
testcase_20 AC 43 ms
52,068 KB
testcase_21 AC 40 ms
52,072 KB
testcase_22 AC 39 ms
53,928 KB
testcase_23 AC 43 ms
52,372 KB
testcase_24 AC 41 ms
52,248 KB
testcase_25 AC 42 ms
54,052 KB
testcase_26 AC 41 ms
53,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N=int(input())
d=list(map(int,input().split()))
x,y=map(int,input().split())
max_d=max(d)
ans=0
l=max(abs(x),abs(y))
ans+=max(0,math.ceil(max(0,(l-max_d*2))/max_d))
l-=max(0,math.ceil((l-max_d*2)/max_d)*max_d)
if l in d:
    ans+=1
elif l==0:
    pass
else:
    ans+=2
print(ans)
0