import sequtils,strutils,osproc;const p = @[ """echo '{.experimental.} import sequtils,strutils,algorithm,math,future,macros template get*():string = stdin.readLine().strip() macro unpack*(arr: auto,cnt: static[int]): auto = let t = genSym(); result = quote do:(let `t` = `arr`;()) for i in 0.. 1600 ms (parallel::3003ms...) let M = get().parseInt() ABT = newSeqWith(M,get().split().map(parseFloat)) var ans = newSeq[float](M) proc solve(m:int) = let (a,b,t) = ABT[m].unpack(3) proc newton(a,b,t:float): float = result = 1.1 var lnx = ln(result) for i in 1..25: result -= (a*lnx + b*lnx.ln - t.ln) / ((a*lnx + b) / (result*lnx)) lnx = result.ln ans[m] = if a == 0: exp(pow(t, 1.0/b)) elif b == 0: pow(t, 1.0/a) else: newton(a,b,t) template parallelDo(fn ,MIN,MAX) = import threadpool,cpuinfo # do fn(i) parallel :: i in [MIN.. h.nim""","nim --hints:off -o:b.out -d:release --threads:on --experimental --parallelBuild:4 c h.nim"].mapIt(it.gorge) discard execProcess("""a="$(ls -1t ../time/ | head -1)";./b.out < ../test_in/$a > ../out/$a""")