Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154865 刘睿霖 12奇数和与偶数和 C++ Compile Error 0 MS 0 KB 287 2026-05-31 10:56:44

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int m; int n; int j=0; int o=0; cin>>m>>n; for(int i=m;i<=n;++i) { if(i%2==1) i+=j; }else{ i+=o; } } cout<<o<<" "<<j; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:6: error: 'else' without a previous 'if'
     }else{
      ^
Main.cc:15:13: error: 'i' was not declared in this scope
             i+=o;
             ^
Main.cc: At global scope:
Main.cc:18:5: error: 'cout' does not name a type
     cout<