#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n=0,a=0;
   for(int i=1;i<=100;i++)
   {
      if(i%2!=0)
      {
         n+=i;
      }
      if(i%2==0)
      {
         a+=i;
      }
   }
   cout<<n<<" "<<a;
   return 0;
}

0 comments

No comments so far...

Information

ID
784
Time
1000ms
Memory
256MiB
Difficulty
3
Tags
# Submissions
93
Accepted
27
Uploaded By