Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110021 | 王思颜 | PELL数列 | C++ | Compile Error | 0 MS | 0 KB | 298 | 2025-02-14 11:05:47 |
#include<bits/stdc++.h> using namespace std; int t,n; long long a[1000001]; int main() { a[1] = 1; a[2] = 2; for (int i = 3;i <= 1000000;i++){ a[i] = 2 * a[i - 1] + a[i - 2]; a[i] = a[i] % 32767; } cin>>t; while (t--){ cin>>n; printf("%11d\n",a[n]) } return 0; }
Main.cc: In function 'int main()': Main.cc:16:23: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=] printf("%11d\n",a[n]) ^ Main.cc:17:2: error: expected ';' before '}' token } ^