結果

問題 No.1042 愚直大学
コンテスト
ユーザー Akijin_007
提出日時 2023-09-22 14:50:15
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 273 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 166 ms
コンパイル使用メモリ 85,492 KB
実行使用メモリ 54,824 KB
最終ジャッジ日時 2026-03-29 23:47:50
合計ジャッジ時間 1,683 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

P, Q = map(int, input().split())
P = 10 ** 9
Q = 10 ** 9
from math import log2

max1 = 10.0 ** 10
min1 = 1.
h = 10 ** 5
while max1 - min1 > 10 ** (-6) and max1 - min1 > h*10**(-6) :
	h = (max1 + min1) / 2
	if h < P/h + Q*log2(h):
		min1 = h
	else:
		max1 = h
		
print(min1)
0