#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> using namespace std; long long func(int m, int n) { long long sum = 1; for (int i = 1; i <= n; i++) { sum *= m; m--; sum /= i; } return sum; } int main() { int n; while (cin >> n) { long long res = func(2 * n, n) / (n + 1); cout << res << endl; } return 0; } |
Double click to view unformatted code.