#include<iostream>
using namespace std;
int JieCheng(int);
int main()
{
int m,n;
int x;
cout<<"please input an number: "<<endl;
cin>>n>>m;
x=JieCheng(m)/(JieCheng(n)*JieCheng(m-n));
cout<<x<<endl;
return 0;
}
int JieCheng(int index)
{
int p=1;
for(int i=1;i<=index;i++)
{
p*=i;
}
return p;
}
14.从m个球中取出n个球的所有组合情况,布布扣,bubuko.com
时间: 2024-12-07 03:10:26