| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160982 | 袁昊贝 | 小明养猪的故事 | C++ | Compile Error | 0 MS | 0 KB | 314 | 2026-09-26 17:44:55 |
#include <bits/stdc++.h> using namespace std; int main() { int T,N; cin>>T; for (int i=0;i<T;i++){ cin>>N; int x[21]={} x[0]=1; x[1]=2; for (int y=2;y<N;y++){ x[y]=x[y-1]+x[y-2]; } } cout<<x[N]<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:10:9: error: expected ',' or ';' before 'x'
x[0]=1;
^
Main.cc:16:11: error: 'x' was not declared in this scope
cout<