#include <fstream>
using namespace std;
ifstream fin ("date.in");
ofstream fout ("date.out");
int main()
{
unsigned long int a[500][500]={0};
int i,j,k,n;
fin>>n>>k;
a[0][0]=1;
for(i=1;i<=n;i++)
for(j=0;j<=i;j++)
if(j==0 || j==i) a[i][j]=1;
else a[i][j]=a[i-1][j]+a[i-1][j-1];
fout<<a[n][k]<<endl;
fin.close();
fout.close();
return 0;
}
|