Mbpp/775

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度333 字符
模型生成的代码 (333 字符)
def odd_position(nums):
    """
    Returns True if every odd index in the list contains an odd number,
    False otherwise. Indices are 0-based.
    """
    # Iterate over odd indices: 1, 3, 5, ...
    for i in range(1, len(nums), 2):
        if nums[i] % 2 == 0:  # Even number at odd index
            return False
    return True
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试