結果

問題 No.456 Millions of Submits!
ユーザー くれちーくれちー
提出日時 2016-12-07 23:41:52
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 525 bytes
コンパイル時間 1,450 ms
コンパイル使用メモリ 33,532 KB
実行使用メモリ 7,668 KB
最終ジャッジ日時 2023-09-05 08:03:35
合計ジャッジ時間 7,784 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cmath>
using namespace std;

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

	int a, b;
	double t, ans;

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

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

	return 0;
}
0