#include<stdio.h>
int main()
{
int a,b=1,m,n;
scanf("%d",&a);
int panzi(int m,int n);
while(b<=a)
{
scanf("%d%d",&m,&n);
printf("%d",panzi(m,n));
b++;
}
return 0;
}
int panzi(int m,int n)
{
if(m==0||m==1||n==1)
return 1;
if(m<n)
return panzi(m,m);
if(m>=n)
return panzi(m-n,n)+panzi(m,n-1);
}
07-18
8615
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)