26852023-01-18 21:38:32kristofIntervallumXOR kihíváspython3Time limit exceeded 35/100583ms11884 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
    drop = x
    if x%2 == 0:
        while x != 0 :
            x >>= 1
            drop |= x
    print(xor, drop)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11052 KiB
subtask215/15
2Accepted23ms11700 KiB
subtask30/15
3Time limit exceeded532ms4368 KiB
subtask420/20
4Accepted17ms11884 KiB
subtask50/50
5Time limit exceeded583ms4488 KiB
6Time limit exceeded574ms4648 KiB