結果

問題 No.456 Millions of Submits!
コンテスト
ユーザー くれちー
提出日時 2016-12-08 14:59:18
言語 C90(gcc15)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
TLE  
(最新)
CE  
(最初)
実行時間 -
コード長 504 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 315 ms
コンパイル使用メモリ 38,652 KB
最終ジャッジ日時 2026-02-23 23:29:53
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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