26862023-01-18 21:39:09kristofIntervallumXOR kihíváspython3Időlimit túllépés 35/100600ms11928 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)
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Elfogadva18ms11084 KiB
subtask215/15
2Elfogadva23ms11460 KiB
subtask30/15
3Időlimit túllépés537ms4192 KiB
subtask420/20
4Elfogadva17ms11928 KiB
subtask50/50
5Időlimit túllépés600ms4616 KiB
6Időlimit túllépés550ms4508 KiB