Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158252 袁昊贝 A+B 输入输出练习IV C++ Compile Error 0 MS 0 KB 257 2026-08-20 17:34:24

Tests(0/0):


Code:

include <bits/stdc++.h> using namespace std; int main(){ int N,a[N]; while (true){ cin>>N; cin>>a[N]; if (N==0){ break; } a[N]+=a[N+1]; cout<<a[N]<<endl; } return 0; }


Run Info:

Main.cc:1:1: error: 'include' does not name a type
 include 
 ^
Main.cc: In function 'int main()':
Main.cc:6:9: error: 'cin' was not declared in this scope
         cin>>N;
         ^
Main.cc:12:9: error: 'cout' was not declared in this scope
         cout<