Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86716 Kevin 13奇数和与偶数和 C++ Accepted 0 MS 272 KB 207 2024-07-27 11:23:53

Tests(10/10):


Code:

#include<iostream> using namespace std; int main() { int n,jihe=0,ouhe=0; cin>>n; for(int i=1;i<=n;i++){ if(i%2) jihe+=i; else ouhe+=i; } cout<<jihe<<" "<<ouhe; return 0; }