#include<iostream> #include<string.h> using namespace std; int a[1005][1005]; int main() { int n; while(cin>>n) { a[n][0]=1; for(int i=0;i<=n;i++) { a[n][i+1]=a[n][i]*(n-i)/(i+1); } int m; while(cin>>m) cout<<a[n][m]<<endl; } }