Untitled

Anonymous
c_cpp
03/09/2024 6:25 PM
344 B
13
Indexable
#include <iostream>

int Akkerman(int m,int n) {

	if (m == 0) return n + 1;
	if (n == 0) return Akkerman(m - 1, 1);
	return Akkerman(m - 1, Akkerman(m, n - 1));
}

int main(){

	int n, m;
	std::cin >> m >> n;
	std::cout << Akkerman(m, n);

}
Editor is loading...
Leave a Comment