26892023-01-18 21:44:27kristofIntervallumXOR kihíváspython3Wrong answer 35/100528ms12124 KiB
N = int(input())
for i in range(N) :
    if i > 60000 :
        exit(0)
    x = int(input()) 
    drop = x
    if x%2 == 0:
        if x%4 == 0 : xor = x
        else: 
            xor = x + 1
        while x != 0 :
            x >>= 1
            drop |= x
    else:
        if x%4 == 1: xor = 1
        else :
            xor = 0
    print(xor, drop)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11084 KiB
subtask215/15
2Accepted21ms11460 KiB
subtask30/15
3Wrong answer407ms11836 KiB
subtask420/20
4Accepted17ms12124 KiB
subtask50/50
5Time limit exceeded509ms11924 KiB
6Time limit exceeded528ms12096 KiB