結果

問題 No.456 Millions of Submits!
ユーザー くれちーくれちー
提出日時 2016-12-07 23:49:10
言語 C90
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 512 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 28,200 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-05 08:13:26
合計ジャッジ時間 9,753 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

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

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

	for (i = 0; i < m; i++) {
		scanf("%d %d %lf", &a, &b, &t);
		if (b == 0) ans = pow(t, 1.0 / a);
		else {
			double n = 1.0;
			while (1) {
				double tmp1 = pow(t, 1.0 / b);
				double tmp2 = pow(n, (double)a / b);
				double tmp3 = n - exp(tmp1 / tmp2);

				if (fabs(tmp3) < 10e-10) {
					ans = n;
					break;
				}
				else n -= tmp3 / 4.0;
			}
		}
		printf("%.10lf\n", ans);
	}

	return 0;
}
0