| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138145 | 刘杨国屹 | 12奇数和与偶数和 | C++ | Accepted | 1 MS | 272 KB | 216 | 2025-11-23 12:44:30 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; long long a=0,b=0; cin>>n>>m; for(int i=n;i<=m;i++){ if(i%2==0){ b+=i; }else{ a+=i; } } cout<<b<<" "<<a; return 0; }