?
# | Author | Problem | Lang | Verdict | Time | Memory | Sent | Judged | |
---|---|---|---|---|---|---|---|---|---|
128104293 |
Practice: forgotten-semicolon |
1567B - 36 | Python 3 | Accepted | 561 ms | 12796 KB | 2021-09-07 10:39:19 | 2021-09-07 10:39:19 |
x=[0] for i in range(int(3.1e5)): x.append(x[-1]^i) for _ in range(int(input())): a,b=map(int,input().split()) z=x[a] if z==b: print(a) elif z^a==b: print(a+2) else: print(a+1)
?
?
?
?