26052023-01-17 23:13:35kristofIntervallumXOR kihíváspython3Wrong answer 35/100488ms12232 KiB
N = int(input())
for i in range(N) :
    if i > 50000 :
        exit(0)
    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 = 0
        while x > 0 :
            x >>= 1
            drop = (drop << 1) + 1
    print(xor, drop, flush=1)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted18ms11456 KiB
subtask215/15
2Accepted23ms11596 KiB
subtask30/15
3Wrong answer400ms11752 KiB
subtask420/20
4Accepted17ms11596 KiB
subtask50/50
5Wrong answer467ms11880 KiB
6Wrong answer488ms12232 KiB