結果

問題 No.1042 愚直大学
ユーザー qibqib
提出日時 2022-10-31 02:46:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 424 ms
コンパイル使用メモリ 87,392 KB
実行使用メモリ 72,056 KB
最終ジャッジ日時 2023-09-22 01:31:14
合計ジャッジ時間 4,067 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,760 KB
testcase_01 AC 84 ms
71,632 KB
testcase_02 AC 78 ms
71,756 KB
testcase_03 AC 78 ms
71,728 KB
testcase_04 AC 80 ms
72,056 KB
testcase_05 AC 80 ms
71,800 KB
testcase_06 AC 79 ms
71,336 KB
testcase_07 AC 77 ms
71,780 KB
testcase_08 AC 79 ms
71,780 KB
testcase_09 AC 80 ms
71,752 KB
testcase_10 AC 81 ms
71,624 KB
testcase_11 AC 79 ms
71,560 KB
testcase_12 AC 81 ms
71,780 KB
testcase_13 AC 81 ms
71,484 KB
testcase_14 AC 80 ms
71,504 KB
testcase_15 AC 80 ms
71,500 KB
testcase_16 AC 79 ms
71,480 KB
testcase_17 AC 79 ms
71,944 KB
testcase_18 AC 86 ms
71,564 KB
testcase_19 AC 81 ms
71,604 KB
testcase_20 AC 80 ms
71,568 KB
testcase_21 AC 78 ms
71,828 KB
testcase_22 AC 78 ms
71,524 KB
testcase_23 AC 79 ms
71,748 KB
testcase_24 AC 80 ms
71,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

EPS = 1e-5

p, q = map(int, input().split())

ok = 1.0
ng = 1.0e12
while abs(ok - ng) > EPS:
  mid = (ok + ng) / 2

  if mid * mid <= p + q * mid * math.log(mid, 2):
    ok = mid
  else:
    ng = mid

print(ok)
0