26982023-01-18 22:16:51kristofIntervallumXOR kihíváspython3Wrong answer 35/100402ms12288 KiB
from sys import stdin, stdout
import sys
import os

def main() :
    N = int(input())
    for i in range(N) :
        if i > 60000 :
            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 = x
            while x != 0 :
                x >>= 1
                drop |= x
        os.write(1, bytes(str(xor) + " " + str(drop) + "\n", 'ascii'))
#   print(xor, drop)
main()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted18ms11120 KiB
subtask215/15
2Accepted21ms11664 KiB
subtask30/15
3Wrong answer321ms11980 KiB
subtask420/20
4Accepted17ms12000 KiB
subtask50/50
5Wrong answer402ms12204 KiB
6Wrong answer393ms12288 KiB