NOJ/37/main.c

16 lines
243 B
C
Raw Permalink Normal View History

2020-08-31 16:46:43 +00:00
#include <stdio.h>
int ack(int m, int n);
int main(void){
int m,n;
scanf("%d %d",&m,&n);
printf("%d\n",ack(m,n));
return 0;
}
int ack(int m, int n){
if(!n) return ack(m-1,1);
else if(!m) return n+1;
else return ack(m-1,ack(m,n-1));
}