結果

問題 No.456 Millions of Submits!
ユーザー t8m8⛄️
提出日時 2016-12-08 00:16:32
言語 Nim
(2.2.0)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 3,350 ms
コンパイル使用メモリ 65,136 KB
実行使用メモリ 10,144 KB
最終ジャッジ日時 2024-06-29 21:24:42
合計ジャッジ時間 12,162 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 5 TLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, math

proc printf(formatstr: cstring) {.header: "<stdio.h>", importc: "printf", varargs.}

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

    printf("%.10f\n", r)
0