Skip to main content
1 of 2
loopy walt
  • 16.8k
  • 2
  • 11
  • 69

Python, 40 bytes

f=lambda x,n:[x**n]+(n*[n]and f(x,n//2))

Attempt This Online!

Doesn't actually implement the algorithm. But produces correct output.

loopy walt
  • 16.8k
  • 2
  • 11
  • 69