Олимпиадный тренинг

Задача 21719. Ackermann function


Задача

Темы: Рекурсия

In the theory of computability, an important role is played by the Ackermann function A(m,n), defined as follows:

You are given two non-negative integers m and n, each on a separate line. Print A(m,n).


Examples
# Input Output
1 2
2
7


 
Запрещенные операторы:for;while;until