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:40:51
2018-05-26 14:09:41
2018-05-26 14:04:36
Task:Alien Invasion
Sender:Robotiimi
Submission time:2018-05-26 14:40:51
Status:READY
Result:ACCEPTED

Show test data

Code

#include <bits/stdc++.h>
#include <string>
#include <cmath>
//#include <array>

using namespace std;


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

string answer;

long double n;
cin >> n;
long double a = sqrt(n);

if (n==1) {
    answer = "odd";
} else if (a == floor(a)) {
    answer = "odd";
} else {
    answer = "even";
}

cout << answer << "\n";
}