Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130873 成书骏 12奇数和与偶数和 C++ Compile Error 0 MS 0 KB 298 2025-09-20 09:30:46

Tests(0/0):


Code:

#include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,i,m,sj=0,so=0; cin>>n>>m; for(i=n;i<=m;i++) { if(i%2==0) so+=i; else sj+=i; } cout<<so<<" "<<sj; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:4: error: 'cin' was not declared in this scope
    cin>>n>>m; 
    ^
Main.cc:13:4: error: 'cout' was not declared in this scope
    cout<