結果
問題 |
No.1042 愚直大学
|
ユーザー |
![]() |
提出日時 | 2020-05-01 22:20:07 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 775 bytes |
コンパイル時間 | 187 ms |
コンパイル使用メモリ | 82,440 KB |
実行使用メモリ | 75,692 KB |
最終ジャッジ日時 | 2024-12-25 12:36:25 |
合計ジャッジ時間 | 4,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 WA * 5 |
ソースコード
import sys input = sys.stdin.readline import math log2 = math.log2 # from collections import deque def linput(_t=int): return list(map(_t, input().split())) def gcd(n,m): while m: n,m = m, n%m return n def lcm(n,m): return n*m//gcd(n,m) def main(): # N = int(input()) # K = int(input()) P,Q = linput() # vA = linput() # vB = linput() # S = input().rstrip() # mX = [linput() for _ in [0,]*N] # res = 0 L, R = 1.0, 10.0**10 M = (L+R)/2 cnt = 0 LMAX = 10010010 EPS = 10.0**-8 while cnt<LMAX and abs(R-L)>EPS: if M*M <= P + M*Q*log2(M): L = M else: R = M M = (L+R)/2 cnt += 1 res = M print(res) # print(("No","Yes")[res%2]) main()