結果

問題 No.456 Millions of Submits!
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-12-08 18:50:45
言語 Nim
(2.0.2)
結果
TLE  
実行時間 -
コード長 596 bytes
コンパイル時間 4,397 ms
コンパイル使用メモリ 65,536 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-12 08:47:19
合計ジャッジ時間 12,768 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import strutils, sequtils, math, strscans

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

proc f(n, a, b : float64): float64 {.inline.} = pow(n, a) * pow(ln(n), b)

when isMainModule:
  var
    m: int
    a, b, t: float64
  scanf("%ld", addr m)

  for i in 0..m-1:
    scanf("%lf %lf %lf", addr a, addr b, addr t)
    var
      l = 0.0
      r = 1000000000.0

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

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