結果

問題 No.456 Millions of Submits!
ユーザー ei1333333
提出日時 2016-12-08 21:25:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 386 bytes
コンパイル時間 1,414 ms
コンパイル使用メモリ 159,444 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 16:16:53
合計ジャッジ時間 9,184 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 TLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |   scanf("%d", &M);
      |   ~~~~~^~~~~~~~~~
main.cpp:14:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |     scanf("%d %d %lf", &A, &B, &T);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int A, B;
double 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(pow(mid, A) * pow(log(mid), B) < T) low = mid;
      else high = mid;
    }
    printf("%.12lf\n", low);
  }
}
0