Baekjoon 11868
님 게임 2


QUESTION ❔



CODE ⌨️

#include <iostream>

using namespace std;

int N, temp, num;

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

	cin >> N;

	for (int i = 0; i < N; i++)
	{
		cin >> num;

		temp = (temp ^ num);
	}

	if (temp == 0) cout << "cubelover\n";
	else cout << "koosaga\n";

	return 0;
}



RESULT 💛



SIMPLE DISCUSSION ✏️

게임 이론 관련 문제였다. XOR(^) 연산자에 대해 공부하였다.



SOURCE 💎

Baekjoon_Link 👈 Click here


*****
NOT A TALENT ❎ NOT GIVING UP ✅
CopyRight ⓒ 2022 DCherish All Rights Reserved.