結果
問題 |
No.1042 愚直大学
|
ユーザー |
![]() |
提出日時 | 2020-05-01 22:29:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 809 bytes |
コンパイル時間 | 229 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,248 KB |
最終ジャッジ日時 | 2024-12-25 13:04:41 |
合計ジャッジ時間 | 11,070 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 5 TLE * 3 |
ソースコード
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 = L # print(res) print("{:.7f}".format(res)) # print(("No","Yes")[res%2]) main()