Mbpp/556

⚠️ Base 通过 / Plus 失败 Base: PASS Plus: FAIL
测试评估
指标结果
Base 测试PASS
Plus 测试FAIL
代码长度418 字符
模型生成的代码 (418 字符)
def find_Odd_Pair(arr, n):
    """
    Counts the number of pairs (i, j) with i < j such that arr[i] ^ arr[j] is odd.
    
    Parameters:
    arr : list of int
        The input array.
    n : int
        Length of the array.
        
    Returns:
    int
        Number of pairs with odd XOR value.
    """
    odd_count = sum(1 for x in arr if x & 1)
    even_count = n - odd_count
    return odd_count * even_count
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 1]