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 14:02:09
Task:Alien Invasion
Sender:DualCore
Submission time:2018-05-26 14:02:09
Status:READY
Result:ACCEPTED

Show test data

Code

#include <iostream>
#include <string>
#include <cmath>

int main()
{
  std::string first_line;
  long long n;
  std::getline(std::cin, first_line);
  n = stoll(first_line);
  long double tmp = std::sqrt(static_cast<long double>(n));
  if (std::floor(tmp) == tmp)
    std::cout << "odd";
  else
    std::cout << "even";
}