結果

問題 No.456 Millions of Submits!
ユーザー 紙ぺーぱー紙ぺーぱー
提出日時 2016-12-08 02:03:45
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 613 bytes
コンパイル時間 2,400 ms
コンパイル使用メモリ 165,184 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 10:48:34
合計ジャッジ時間 8,156 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
double pp(double x,int k){
    double ret = 1.0;
    while (k)
    {
        if ((k & 1) == 1) ret *= x;
        x *= x;
        k >>= 1;
    }
    return ret;
}

int main(){
    int n,a,b;
    double t;
    scanf("%d\n",&n);
    for(int i=0;i<n;i++){
        scanf("%d%d%lf\n",&a,&b,&t);
        double l=0.0,r=0.0;
        if(a==0)r=pow(exp(10),1+1.0/b);
        else r=pow(10,1+1.0/a);
        for(int k=0;k<50;k++){
            double x=(l+r)/2;
            double u=pp(x,a)*pp(log(x),b);
            if(u<=t)l=x;
            else r=x;
        }
        printf("%.10lf\n",r);
    }
}
0