提交时间:2023-11-11 10:35:43

运行 ID: 109761

#include <bits/stdc++.h> #define int __int128 using namespace std; int f[1005] = {1,1,2}; int n; int read() { int res = 0,f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') f = -1; c = getchar(); } while (isdigit(c)) { res = (res << 1) + (res << 3) + (c ^ 48); c = getchar(); } return res * f; } void werite(int x) { if (x >= 10) werite(x / 10); putchar(x % 10 + '0'); } signed main() { n = read(); for (int i = 3; i <= n; i++) for (int j = 0; j < i; j++) f[i] += f[j] * f[i - 1 - j]; werite(f[n]); puts(""); return 0; }