//No.64 XORフィボナッチ数列 #include #include using namespace std; signed main(){ unsigned long long int f0 , f1 , n; cin >> f0 >> f1 >> n; vector f(n + 1); f[0] = f0; f[1] = f1; for( int i = 2 ; i <= n ; ++i ){ f[i] = f[i-1]^f[i-2]; } cout << f[n] << endl; }