提交时间:2023-10-31 20:30:32
运行 ID: 29583
#include <bits/stdc++.h> using namespace std; int main() { long long a[1000005] = {0, 1, 2}; for (int i = 3; i <= 1000000; ++ i) a[i] = a[i - 1] * 2 + a[i - 2]; int n; cin >> n; while (n --) { int b; cin >> b; cout << a[b] % 32767; } return 0; }