#include <cstdio> #include <iostream> using namespace std; long long f(int m,int n){ long long ans=1; for(int i=1;i<=n;i++){ ans=ans*m/i; m--; } return ans; } int main(){ int n; while(scanf("%d",&n)!=EOF){ printf("%Ld\n",f(n*2,n)/(n+1)); } } /* 10 5 10 10 5 5 10 10 5 10 5 5 10 10 10 5 5 5 10 10 10 5 10 5 5 5 10 10 10 5 5 10 5 5 10 10 10 10 5 5 5 5 10 10 10 10 5 10 5 5 5 5 10 10 10 10 5 5 10 5 5 5 10 10 10 10 5 5 5 10 5 5 10 10 10 10 10 5 5 5 5 5 */ |
Double click to view unformatted code.