結果
問題 | 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 sysinput = sys.stdin.readlineimport mathlog2 = math.log2# from collections import dequedef linput(_t=int):return list(map(_t, input().split()))def gcd(n,m):while m: n,m = m, n%mreturn ndef 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 = 0L, R = 1.0, 10.0**10M = (L+R)/2cnt = 0LMAX = 10010010EPS = 10.0**-8while cnt<LMAX and abs(R-L)>EPS:if M*M <= P + M*Q*log2(M):L = Melse:R = MM = (L+R)/2cnt += 1res = L# print(res)print("{:.7f}".format(res))# print(("No","Yes")[res%2])main()