dev/cpp/akk/akk.cpp

15 lines
329 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <iostream>
#include <cstdlib>
using namespace std;ывав
typedef unsigned long long ll;
ll f(ll m, ll n) {
if(m==0) return n+1;
if(n==0) return f(m-1,1);
return f(m-1,f(m,n-1));
}
int main(int argc, char *argv[])
{
for(int i=0;i<30;i++) cout << "akk("<<3<<";"<<i<<") = "<<f(3,i)<<endl;
return 0;
}