2601 | 2023-01-17 22:13:59 | kristof | IntervallumXOR kihívás | python3 | Wrong answer 0/100 | 600ms | 12356 KiB |
N = int(input())
for i in range(N) :
x = int(input())
if x%4 == 0 : xor = x
if x%4 == 1 : xor = 1
if x%4 == 2 : xor = x + 1
if x%4 == 3 : xor = 0
if x%2 :
drop = x
else :
drop = 0x3fffffff
m = 0x20000000
for index in range(30) :
if x ^ m : drop ^= m
else : break
m >>= 1
print(xor, drop)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 11236 KiB | ||||
subtask2 | 0/15 | ||||||
2 | Wrong answer | 28ms | 11536 KiB | ||||
subtask3 | 0/15 | ||||||
3 | Time limit exceeded | 578ms | 4124 KiB | ||||
subtask4 | 0/20 | ||||||
4 | Wrong answer | 17ms | 12356 KiB | ||||
subtask5 | 0/50 | ||||||
5 | Time limit exceeded | 600ms | 4612 KiB | ||||
6 | Time limit exceeded | 552ms | 4944 KiB |