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 11:07:04
Task:Alien Invasion
Sender:Wave of Technology
Submission time:2018-05-26 11:07:04
Status:READY
Result:ACCEPTED

Show test data

Code

#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

typedef long long ll;



int main() {
  ll x;

  cin >> x;

  ll xx = sqrt(x);
  const ll N = 1000000;

  for (ll a = xx-N; a <= xx+N; a++) {
    if (a*a == x) {
      cout << "odd\n";
      return 0;
    }
  }

  cout << "even\n";
  return 0;
  
}