結果

問題 No.456 Millions of Submits!
ユーザー くれちーくれちー
提出日時 2016-12-07 23:37:36
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 554 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 33,448 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-05 07:50:51
合計ジャッジ時間 4,325 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

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

	if (m > 300000) return -1;

	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 / 4.0;
			}
		}
		printf("%.10lf\n", ans);
	}

	return 0;
}
0