#include
int main()
{
int c,m,n,sum;
scanf("%d%d",&n,&m);
sum=fun(n)/fun(m);
sum/=fun(n-m);
printf("组合数C(%d,%d)=%d\n",n,m,sum);
sum=fun(n)/fun(n-m);
printf("排列数P(%d,%d)=%d",n,m,sum);
}
int fun(int m)
{
int i,c=1;
for(i=m;i>=1;i--)
{
c*=i;
}
return c;
}