結果

問題 No.456 Millions of Submits!
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-12-07 23:53:55
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 455 bytes
コンパイル時間 3,889 ms
コンパイル使用メモリ 70,828 KB
実行使用メモリ 7,880 KB
最終ジャッジ日時 2023-09-12 08:39:29
合計ジャッジ時間 14,868 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 3 ms
4,376 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, math

proc f(n: float64, a, b : int): float64 = pow(n, a.float64) * pow(ln(n), b.float64)

when isMainModule:
  var m = stdin.readLine.parseInt
  for i in 0..m-1:
    var
      tmp = stdin.readLine.split
      a = tmp[0].parseInt
      b = tmp[1].parseInt
      t = tmp[2].parseFloat
      (l, r) = (0.0, 100.0)

    for i in 1..100:
      var mid = (l + r) / 2
      if f(mid, a, b) < t: l = mid
      else: r = mid

    echo r
0