結果
問題 |
No.467 隠されていたゲーム
|
ユーザー |
|
提出日時 | 2021-03-11 15:20:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 82,584 KB |
実行使用メモリ | 54,360 KB |
最終ジャッジ日時 | 2024-10-13 03:47:36 |
合計ジャッジ時間 | 1,938 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 2 |
ソースコード
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==max_d: ans+=1 elif l==0: pass else: ans+=2 print(ans)