g | x | w | all
Bytes Lang Time Link
012Pari/GP180327T000159ZGamrCorp
059JavaScript Node.js180326T231905Zl4m2

Pari/GP, 12 bytes

x->n->x^n^-1

Try it online!

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

Try it online!