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 13:15:13
2018-05-26 12:52:33
2018-05-26 12:46:57
2018-05-26 11:58:12
2018-05-26 11:47:01
Task:Alien Invasion
Sender:Oispa nutellaa
Submission time:2018-05-26 13:15:13
Status:READY
Result:ACCEPTED

Show test data

Code

#include <iostream>
#include <vector>
#include <map>

using namespace std;
typedef long long ll;
typedef __int128 lll;

ll n;

int main() {
	cin >> n;
	lll a = 1;
	for (lll b = (1LL<<61); b >= 1; b /= 2) {
		if ((a+b)*(a+b) <= n) a += b;
	}
	if (a*a == n) cout << "odd\n";
	else cout << "even\n";
	return 0;
}