Untitled

Anonymous
python
02/13/2026 9:03 PM
436 B
16
Indexable
n = int(input()) 
k = int(input()) 
arr = [] 
for i in range(n):
    arr.append(int(input())) 
print(arr) 
count = 0 
for i in range(len(arr)): 
    current_xor = 0 
    for j in range(i + 1,len(arr)): 
        current_xor = arr[i]^arr[j] 
        if current_xor == k:
            count = count + 1 
print(count)
Editor is loading...
Leave a Comment