| Bytes | Lang | Time | Link |
|---|---|---|---|
| 012 | Pari/GP | 180327T000159Z | GamrCorp |
| 059 | JavaScript Node.js | 180326T231905Z | l4m2 |
Pari/GP, 12 bytes
x->n->x^n^-1
All test cases, including the sample test case (1234^123456) and case x=10^10^6-1 & n=10^6-1, finish in under 50ms.
JavaScript (Node.js), 59 bytes
n=>x=>10**((x.length+Math.log10('.'+x.slice(0,99)))/n)+.5|0