結果
問題 |
No.456 Millions of Submits!
|
ユーザー |
|
提出日時 | 2017-04-02 14:13:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1,756 ms / 4,500 ms |
コード長 | 615 bytes |
コンパイル時間 | 1,658 ms |
コンパイル使用メモリ | 167,176 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 18:40:48 |
合計ジャッジ時間 | 8,052 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int m; scanf("%d", &m); double e = exp(1); while(m--) { int a, b; double t; scanf("%d%d%lf", &a, &b, &t); if (!b) { printf("%.12f\n", pow(t, 1.0 / a)); continue; } if (!a) { printf("%.12f\n", exp(pow(t, 1.0 / b))); continue; } double q = pow(t, 1.0 / b) * a / b; double l = min(e, q), r = max(e, q), p; for (int it = 0; it < 40; ++it) { p = (l + r) / 2; (p * log(p) > q) ? r = p : l = p; } printf("%.12f\n", pow(r, (double)b / a)); } return 0; }