Mbpp/770

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度369 字符
模型生成的代码 (369 字符)
def odd_num_sum(n):
    """
    Compute the sum of the fourth power of the first n odd natural numbers.

    Args:
        n (int): The count of odd numbers to include.

    Returns:
        int: The sum of 1^4 + 3^4 + ... + (2n-1)^4.
    """
    total = 0
    for i in range(1, 2 * n, 2):  # generates 1, 3, 5, ... up to (2n-1)
        total += i ** 4
    return total
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试