結果

問題 No.456 Millions of Submits!
ユーザー くれちーくれちー
提出日時 2016-12-08 14:59:18
言語 C90
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 504 bytes
コンパイル時間 1,019 ms
コンパイル使用メモリ 26,332 KB
実行使用メモリ 10,844 KB
最終ジャッジ日時 2023-09-05 15:26:42
合計ジャッジ時間 13,207 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

double W(double y) {
	double x = 1.0;
	while (1) {
		double tmp = y - x * exp(x);
		if (fabs(tmp) < 10e-10) return x;
		else x += tmp / 4.0;
	}
}

int main() {
	int m;
	scanf("%d", &m);

	double a, b, t, ans;
	int i;

	for (i = 0; i < m; i++) {
		scanf("%lf %lf %lf", &a, &b, &t);
		if (a == 0) ans = exp(pow(t, 1.0 / b));
		else if (b == 0) ans = pow(t, 1.0 / a);
		else ans = exp(b / a * W(-(a * pow(-t, 1.0 / b) / b)));
		printf("%.10lf\n", ans);
	}

	return 0;
}
0