Accepted
Code
def xor(x):
if x%4==0:
return n
if x%4 ==1:
return 1
if x%4==2:
return n+1
return 0
for _ in range(int(input())):
n = int(input())
ans = xor(n)
print(ans)
Information
- Submit By
- Type
- Submission
- Problem
- P1009 XOR Love
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2023-12-10 18:08:22
- Judged At
- 2023-12-26 21:05:58
- Judged By
- Score
- 100
- Total Time
- 309ms
- Peak Memory
- 3.926 MiB