Mbpp/770

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度370 字符
模型生成的代码 (370 字符)
def odd_num_sum(n: int) -> int:
    """
    Compute the sum of the fourth powers of the first n odd natural numbers.
    
    Args:
        n (int): Number of odd natural numbers.
        
    Returns:
        int: Sum of the fourth powers.
    """
    # The k-th odd natural number is (2k - 1)
    total = sum((2 * k - 1) ** 4 for k in range(1, n + 1))
    return total
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试