#include<iostream>
#include<algorithm>
using namespace std;
typedef long long LL;
LL C(int a,int b)//求组合数
{ LL res=1;
for(int i=a,j=1;j<=b;i--,j++)
{
res=res*i/j; }
return res;
}
int main()
{
int n,m;
cin>>n>>m;
cout<<C(n,m);
return 0;
}
分析:
运行结果截图: