結果

問題 No.456 Millions of Submits!
ユーザー YamyukiYamyuki
提出日時 2016-12-07 22:48:48
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 574 ms
コンパイル使用メモリ 26,536 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 06:44:24
合計ジャッジ時間 7,331 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>
#include<math.h>

int a,b;

double beki(double x,int n){
	if(n==0) return 1;
	return x*beki(x,n-1);
}

double result(double x){
	return beki(x,a)*beki(log(x),b);
}

int main(){
	long m,i;
	double time,s,e,dif;
	scanf("%ld",&m);
	for(i=0;i<m;i++){
		scanf("%d %d %lf",&a,&b,&time);
		s=0.0;
		e=22027.0;
		dif=time-result((s+e)/2.0);
		while(dif>0.000000001 || dif<-0.000000001){
			if(dif>0){
				s=(s+e)/2.0;
			}else{
				e=(s+e)/2.0;
			}
			dif=time-result((s+e)/2.0);
		}
		printf("%.10f\n",(e+s)/2.0);
	}
	return 0;
}
0