a guest Aug 25th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. t=int(input())
  2. for j in range(t):
  3.     a, b, n = [int(i) for i in input().split()]
  4.     if(n%3==0):
  5.         print(a)
  6.     if(n%3==1):
  7.         print(b)
  8.     if(n%3==2):
  9.         print(a^b)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand