結果

問題 No.456 Millions of Submits!
ユーザー butsurizukibutsurizuki
提出日時 2016-12-08 23:08:10
言語 C90
(gcc 11.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 610 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 26,792 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 21:14:58
合計ジャッジ時間 7,851 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<stdio.h>
#include<math.h>
#define e 2.7182818284590452355

double big(double a,double b){if(a>b){return a;}return b;}

int main(void){
	int i,j,n,a,b;
	double min,max,c,t,ax,bx;
	scanf("%d",&n);
	for(i = 1;i <= n;i++){
		scanf("%d%d%lf",&a,&b,&t);
		if(a && b){min = 1;max = big(e,t);}
		else if(b == 0){ax = a;printf("%.12lf\n",pow(t,1/ax));continue;}
		else{bx = b;printf("%.12lf\n",pow(e,pow(t,1/bx)));continue;}
		for(j = 1;j <= 32;j++){
			c = (min+max)/2;
			ax = pow(c,a);
			bx = pow(log(c),b);
			if(ax*bx < t){min = c;}
			else{max = c;}
		}
		printf("%.12lf\n",(max+min)/2);
	}
	return 0;
}
0