26012023-01-17 22:13:59kristofIntervallumXOR kihíváspython3Wrong answer 0/100600ms12356 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)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer17ms11236 KiB
subtask20/15
2Wrong answer28ms11536 KiB
subtask30/15
3Time limit exceeded578ms4124 KiB
subtask40/20
4Wrong answer17ms12356 KiB
subtask50/50
5Time limit exceeded600ms4612 KiB
6Time limit exceeded552ms4944 KiB