Skip to main content
3 of 4
Editing in extra test case
izzyg
  • 42.3k
  • 5
  • 79
  • 216

Print the tetration

Tetration, represented as a^^b, is repeated exponentiation. For example, 2^^3 is 2^2^2, which is 16.

Given two numbers a and b, print a^^b.

Test cases

1 2 -> 1 2 2 -> 4 5 2 -> 3125 3 3 -> 7625597484987 etc. 

Scientific notation is acceptable.

Remember, this is , so the code with the smallest number of bytes wins.

Oliver Ni
  • 10.7k
  • 4
  • 42
  • 110