← Back to List

12833번: XORXORXOR ↗

Solutions

C++14
171 B | 171 chars
#include <iostream>
using namespace std;
int A,B,C;
int main()
{
    cin>>A>>B>>C;
    if(C%2==1)
    {
        cout<< (A^B);
    }
    else
    {
        cout<<A;
    }
}