結果
問題 |
No.1042 愚直大学
|
ユーザー |
![]() |
提出日時 | 2023-04-12 10:52:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 573 bytes |
コンパイル時間 | 3,794 ms |
コンパイル使用メモリ | 252,016 KB |
最終ジャッジ日時 | 2025-02-12 05:14:23 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 8 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=1444999999999999; ll mod=998244353; int main(){ ld p,q; cin >> p >> q; ld left=1.0,right=mod; for (ll i = 0; i < 1000; i++) { ld mid=(right+left)/2.0; ld x=log(2.0); ld y=log(mid); y/=x; if (mid*mid<q*mid*y+p) { left=mid; }else{ right=mid; } } cout << setprecision(100) << left << endl; }