1.我们先输入n m的数字,因为n!/(n-m)!的阶乘。即4!=4*3*2*1,2!=2*1,4!/2!=12.或者4!=4*3*2!。
#include<sdtio.h>
int main()
{
int n = 0;
int m = 0;
long long a = 1;
while ((scanf_s("%d%d",&n,&m))!=EOF)
{
for (int i = n; i > n-m; i--)
{
a = a * i;
}
printf("%lld\n", a);
}
return 0;
}