#include <cstdio>
#include <iostream>
#define ll long long
using namespace std;
ll C(ll n,ll m){
if(n<m)return 0;
if(n==m)return 1;
ll ans=1;
ll mx=max(n-m,m);
ll mi=n-mx;
for(int i=1;i<=mi;i++){
ans=ans*(mx+i)/i;
}
return ans;
}
int main(){
ll n,m;
cin>>n>>m;
cout<<C(n,m);
return 0;
}
转载于:https://www.cnblogs.com/Emcikem/p/11466578.html