結果
| 問題 |
No.456 Millions of Submits!
|
| コンテスト | |
| ユーザー |
ei1333333
|
| 提出日時 | 2016-12-08 21:23:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 1,250 ms |
| コンパイル使用メモリ | 159,776 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 16:14:39 |
| 合計ジャッジ時間 | 6,660 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 12 |
コンパイルメッセージ
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 = 10;
for(int i = 0; i < 30; i++) {
double mid = (low + high) * 0.5;
if(F(mid)) low = mid;
else high = mid;
}
printf("%.12lf\n", low);
}
}
ei1333333