int f(int n, int m)
{
int fn=0,i;
if(m<0||m>10*n) return 0;
if(n==1) return 1;
for(i=0;i<=10;i++)
fn+=f(n-1,m-i);
return fn;
}
int main()
{
int n,m;
printf("Please enter n and m:");
scanf("%d%d",&n,&m);
printf("\n%d发打中%d环有%d种可能.\n",n,m,f(n,m));
system("PAUSE");
return 0;
}