26062023-01-17 23:18:24kristofIntervallumXOR kihíváspython3Wrong answer 35/100490ms12656 KiB
N = int(input())
for i in range(N) :
    if i > 50000 :
        exit(0)
    x = int(input()) 
    if x%4 == 0 : xor = x
    if x%2 :
        if x%4 == 1: xor = 1
        else: xor = 0
        drop = x
    else :
        if x%4 == 2: xor = x + 1
        else: xor = x
        drop = 0
        while x > 0 :
            x >>= 1
            drop = (drop << 1) + 1
    print(xor, drop, flush=1)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11276 KiB
subtask215/15
2Accepted23ms11716 KiB
subtask30/15
3Wrong answer356ms12212 KiB
subtask420/20
4Accepted17ms12128 KiB
subtask50/50
5Wrong answer460ms12656 KiB
6Wrong answer490ms12476 KiB