#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,n,s1=0,s2=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if(i%2==0)
s1+=i;
else
s2+=i;
}
printf("%d %d\n",s1,s2);
return 0;
}
标签:std,奇偶,4.3,int,s2,2018,main
来源: https://www.cnblogs.com/zheng1945/p/16273095.html