
    Design a function for a social event recommendation system that identifies compatible friend pairs by analyzing their interest compatibility scores, where two friends are considered compatible for joint event recommendations if the XOR of their interest codes results in an even number. Given a list of user interest codes from a friend group, determine how many unique pairs of users could receive meaningful joint event recommendations based on their interest compatibility.
    

    
def find_even_pair(A):
    """
    Design a function for a social event recommendation system that identifies compatible friend pairs by analyzing their interest compatibility scores, where two friends are considered compatible for joint event recommendations if the XOR of their interest codes results in an even number. Given a list of user interest codes from a friend group, determine how many unique pairs of users could receive meaningful joint event recommendations based on their interest compatibility.
    

    """
def find_even_pair(A):
    """
    Design a function for a social event recommendation system that identifies compatible friend pairs by analyzing their interest compatibility scores, where two friends are considered compatible for joint event recommendations if the XOR of their interest codes results in an even number. Given a list of user interest codes from a friend group, determine how many unique pairs of users could receive meaningful joint event recommendations based on their interest compatibility.
    

    """
    count = 0
    for i in range(0, len(A)):
        for j in range(i + 1, len(A)):
            if (A[i] ^ A[j]) % 2 == 0:
                count += 1
    return count