Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102759 | 袁龙浩 | 12奇数和与偶数和 | C++ | Wrong Answer | 0 MS | 272 KB | 504 | 2024-12-22 15:48:05 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m,ji=0,ou=0; cin>>n>>m; for(int i=n;i<=m;i+=1){ if(i%2==0){ ou=ou+i; } else{ ji=ji+i; } } cout<<ji<<" "<<ou; return 0; }
------Input------
5 103
------Answer-----
2646 2700
------Your output-----
2700 2646