Inspired by Expand exponentation.
Knuth's up arrow notation is used for big numbers such as Graham's number.
If we look deeper, we can see how it makes big numbers.
One arrow means exponentiation. e.g. 2↑3 equals 2^3 = 8.
Two or more arrows means repeating the instructions of n-1 arrows. e.g. 2↑↑3 equals 2↑2↑2 equals 2^(2^2)=16.
You will be given three integers, n, a, and m. n is the first number, a is the amount of arrows, and m is the second number.
Your code should output the final answer, which is the calculation of n ↑a m
(↑x means there are x up-arrows, where x is an integer)
Examples
2 1 2 -> 4
2 1 3 -> 8
2 2 3 -> 16
2 3 3 -> 65536
3 2 2
and3 2 3
as additional test cases. \$\endgroup\$