結果
| 問題 | No.598 オーバーフローファンタジー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-24 22:48:46 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-05-31 19:38:43 |
| 合計ジャッジ時間 | 2,283 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
import math
def solve():
n, x, a, b = [int(input()) for _ in [0]*4]
bits_list = [2 ** i for i in range(33)]
overflag = bits_list[n - 1]
ta = math.ceil(x / a)
tb = math.ceil((overflag - x) / b)
print(min(ta, tb))
if __name__=="__main__":
solve()