結果
| 問題 |
No.456 Millions of Submits!
|
| コンテスト | |
| ユーザー |
ei1333333
|
| 提出日時 | 2016-12-08 21:22:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 4,428 ms / 4,500 ms |
| コード長 | 424 bytes |
| コンパイル時間 | 1,282 ms |
| コンパイル使用メモリ | 158,360 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 16:14:30 |
| 合計ジャッジ時間 | 8,873 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | scanf("%d", &M);
| ~~~~~^~~~~~~~~~
main.cpp:18:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
18 | scanf("%d %d %lf", &A, &B, &T);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
int A, B;
double T;
double F(double N)
{
return (pow(N, A) * pow(log(N), B) < T);
}
int main()
{
int M;
scanf("%d", &M);
while(M--) {
scanf("%d %d %lf", &A, &B, &T);
double low = 0, high = 1e5;
for(int i = 0; i < 50; i++) {
double mid = (low + high) * 0.5;
if(F(mid)) low = mid;
else high = mid;
}
printf("%.12lf\n", low);
}
}
ei1333333