結果

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

テストケース

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

ソースコード

diff #

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

int a,b;

double result(double x){
	return pow(x,(double)a)*pow(log(x),(double)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.0000000001 || dif<-0.0000000001){
			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