#include <iostream>
using namespace std;
int main()
{
int i,j,k,count1=0,count2=0;
cin>>i;
for(j=1;j<=i;j++){
if(j%2==1) count1++;
if(j%2==0) count2++;
}
count1=-count1;
cout<<count2<<' '<<count1;
return 0;
}
HPU 1341: 统计奇偶数 [水题]
最新推荐文章于 2018-05-01 10:04:10 发布