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:47:36
2018-05-26 11:27:00
Task:Alien Invasion
Sender:Lucinda
Submission time:2018-05-26 12:47:36
Status:READY
Result:ACCEPTED

Show test data

Code

#include <iostream>
#include <string>
#include <stdio.h>
#include <math.h>
#include <vector>

using namespace std;

int main() {
    long n;
    cin >> n;
    if (n == 1)  {
        cout << "odd" << endl;
        return 0;
    }
    
    long r = floor(sqrt(n));
    if (r * r == n) {
        cout << "odd" << endl;
    } else {
        cout << "even" << endl;
    }
}