26772023-01-18 21:14:25kristofIntervallumXOR kihíváspython3Wrong answer 35/10094ms12336 KiB
N = int(input())
for i in range(N) :
    if i > 10000 :
        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 = 0x3fffffff
        m = 0x20000000
        for index in range(30) :
            if x & m : 
                break
            else : 
                drop ^= m
            m >>= 1
    print(xor, drop)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11336 KiB
subtask215/15
2Accepted26ms11772 KiB
subtask30/15
3Wrong answer94ms11996 KiB
subtask420/20
4Accepted17ms12244 KiB
subtask50/50
5Wrong answer75ms12292 KiB
6Wrong answer78ms12336 KiB