結果
問題 | No.456 Millions of Submits! |
ユーザー |
![]() |
提出日時 | 2016-12-31 23:12:39 |
言語 | D (dmd 2.106.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 2,963 ms |
コンパイル使用メモリ | 156,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-12 06:13:03 |
合計ジャッジ時間 | 12,941 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | TLE | - |
ソースコード
import std.conv; import std.math; import std.numeric; import std.stdio; import std.string; real solveEquation(int a, int b, real t) { //auto g = (T n) => a * n.log + b * n.log.log - t.log; auto g = (real n) => pow(n, a) * pow(n.log, b) - t; real root; if (b > 0) { root = findRoot(g, 1.0L, real.max); } else { root = findRoot(g, 0.0L, real.max); } return root; } void main(){ auto m = readln.chomp.to!int; foreach (i; 0..m) { auto s = readln.split; auto a = s[0].to!int; auto b = s[1].to!int; auto t = s[2].to!real; auto res = solveEquation(a, b, t); writefln("%.10f\n", res); } }