26042023-01-17 23:13:02kristofIntervallumXOR kihíváspython3Wrong answer 35/100280ms12172 KiB
N = int(input())
for i in range(N) :
    if i > 30000 :
        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 = 0
        while x > 0 :
            x >>= 1
            drop = (drop << 1) + 1
    print(xor, drop, flush=1)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11268 KiB
subtask215/15
2Accepted23ms11032 KiB
subtask30/15
3Wrong answer219ms11864 KiB
subtask420/20
4Accepted17ms11860 KiB
subtask50/50
5Wrong answer280ms12172 KiB
6Wrong answer280ms12072 KiB