Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
90499 | 李谨睿 | 12奇数和与偶数和 | C++ | Wrong Answer | 1 MS | 268 KB | 240 | 2024-09-15 13:37:39 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,s=0,d=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(i%2==0){ s=s+i; }else{ d=d+i; } } cout<<s; cout<<d; return 0; }
------Input------
5 103
------Answer-----
2646 2700
------Your output-----
26462700