2607 | 2023-01-17 23:21:14 | kristof | IntervallumXOR kihívás | python3 | Wrong answer 0/100 | 272ms | 12476 KiB |
from sys import stdin, stdout
import sys
import os
N = int(input())
for i in range(N) :
if i > 50000 :
exit(0)
x = int(input())
if x%4 == 0 : xor = x
if x%2 :
if x%4 == 1: xor = 1
else: xor = 0
drop = x
else :
if x%4 == 2: xor = x + 1
else: xor = x
drop = 0
while x > 0 :
x >>= 1
drop = (drop << 1) + 1
sys.stdout.write(str(xor) + " " + str(drop) + "\n")
# print(xor, drop)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 11140 KiB | ||||
subtask2 | 0/15 | ||||||
2 | Wrong answer | 19ms | 11352 KiB | ||||
subtask3 | 0/15 | ||||||
3 | Wrong answer | 173ms | 11964 KiB | ||||
subtask4 | 0/20 | ||||||
4 | Wrong answer | 17ms | 11672 KiB | ||||
subtask5 | 0/50 | ||||||
5 | Wrong answer | 261ms | 12004 KiB | ||||
6 | Wrong answer | 272ms | 12476 KiB |