Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149149 王峻熙 12序列找规律 C++ Compile Error 0 MS 0 KB 286 2026-03-07 15:49:43

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl using namespace std; int main(){ int s1=10000,s2==10000,n; cin>>n; for(int i=0;i<=(n-1)/2;i++){ s1=s1-1; s2=s2-2; } if(n%2==0) cout<<s2<<endl; else cout<<s2<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:20: error: expected initializer before '==' token
     int s1=10000,s2==10000,n;
                    ^
Main.cc:5:10: error: 'n' was not declared in this scope
     cin>>n;
          ^
Main.cc:8:9: error: 's2' was not declared in this scope
         s2=s2-2;
         ^
Main.cc:11:15: error: 's2' was not declared in this scope
         cout<