結果

問題 No.598 オーバーフローファンタジー
ユーザー RyutoRyuto
提出日時 2017-12-16 01:11:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 781 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 71,748 KB
最終ジャッジ日時 2023-08-26 22:34:30
合計ジャッジ時間 3,517 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,460 KB
testcase_01 AC 67 ms
71,696 KB
testcase_02 AC 68 ms
71,684 KB
testcase_03 AC 70 ms
71,664 KB
testcase_04 AC 66 ms
71,472 KB
testcase_05 AC 67 ms
71,524 KB
testcase_06 AC 67 ms
71,272 KB
testcase_07 AC 66 ms
71,332 KB
testcase_08 AC 66 ms
71,312 KB
testcase_09 AC 67 ms
71,496 KB
testcase_10 AC 69 ms
71,328 KB
testcase_11 AC 66 ms
71,416 KB
testcase_12 AC 68 ms
71,416 KB
testcase_13 AC 69 ms
71,668 KB
testcase_14 AC 68 ms
71,308 KB
testcase_15 AC 67 ms
71,748 KB
testcase_16 AC 70 ms
71,328 KB
testcase_17 AC 68 ms
71,344 KB
testcase_18 AC 67 ms
71,384 KB
testcase_19 AC 66 ms
71,360 KB
testcase_20 AC 65 ms
71,324 KB
testcase_21 AC 65 ms
71,412 KB
testcase_22 AC 65 ms
71,408 KB
testcase_23 AC 67 ms
71,512 KB
testcase_24 AC 67 ms
71,400 KB
testcase_25 AC 67 ms
71,116 KB
testcase_26 AC 67 ms
71,192 KB
testcase_27 AC 68 ms
71,708 KB
testcase_28 AC 64 ms
71,504 KB
testcase_29 AC 65 ms
71,136 KB
testcase_30 AC 65 ms
71,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
import math

N = int(input())
X = int(input())
A = int(input())
B = int(input())

maxpower = 0
for i in range(N-1):
    maxpower += 2**i

ans = min(math.ceil(X/A), math.ceil((maxpower+1-X)/B))
print(ans)
0