题目链接:http://lx.lanqiao.cn/problemset.page?code=BEGIN
BEGIN-1 A+B问题
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b << " "; return 0; }
BEGIN-2 序列求和
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << n * (n + 1) / 2 << " "; return 0; }
BEGIN-3 圆的面积
#include <bits/stdc++.h> using namespace std; const double PI = acos(-1); int main() { int r; cin >> r; printf("%.7f", PI * r * r); return 0; }
BEGIN-4 Fibonacci数列
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 100; const int MOD = 10007; int main() { vector<int> f(N); f[1] = f[2] = 1; for (int i = 3; i < N; i++) { f[i] = (f[i - 1] + f[i - 2]) % MOD; } int n; cin >> n; cout << f[n] << " "; return 0; }