Code Submission Evaluation System Login

CSES - HIIT Open 2018

HIIT Open 2018

Contest start:2018-05-26 11:00:00
Contest end:2018-05-26 16:00:00

Task list | Submit code | Submissions | Messages | Scoreboard | Statistics


History
2018-05-26 12:27:31
2018-05-26 12:24:32
2018-05-26 12:13:05
2018-05-26 12:09:58
Task:Alien Invasion
Sender:Sloths
Submission time:2018-05-26 12:27:31
Status:READY
Result:TIME LIMIT EXCEEDED

Show test data

Code

#include <bits/stdc++.h>
#include <iostream>
#include <string>

using namespace std;

int main()
{
  ios::sync_with_stdio(0);
  cin.tie(0);

  int divisors = 2;
  int n;
  cin >> n;

  if (n == 1)
    cout << "odd";
  else
    {
      for (int i=2; i<n/2+1; i++)
	if (n%i == 0)
	  divisors += 1;
      
      if (divisors % 2 == 0)
	cout << "even";
      else cout << "odd";
    }

  return 0;
}