26832023-01-18 21:32:02kristofIntervallumXOR kihíváspython3Wrong answer 15/100490ms12072 KiB
N = int(input())
for i in range(N) :
    if i > 80000 :
        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
        drop = 0x3fff
        m = 0x2000
        for index in range(16) :
            if x & m : 
                break
            else : 
                drop ^= m
            m >>= 1
    print(xor, drop)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11576 KiB
subtask215/15
2Accepted23ms11476 KiB
subtask30/15
3Wrong answer416ms11848 KiB
subtask40/20
4Wrong answer17ms11632 KiB
subtask50/50
5Wrong answer490ms11952 KiB
6Wrong answer488ms12072 KiB