测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | FAIL |
| 代码长度 | 395 字符 |
模型生成的代码 (395 字符)
import math
def count_binary_seq(n: int) -> int:
"""
Returns the number of binary sequences of length 2n such that
the sum of the first n bits equals the sum of the last n bits.
The count is given by the central binomial coefficient C(2n, n),
which can be derived from Vandermonde's identity:
sum_{k=0}^{n} C(n, k)^2 = C(2n, n)
"""
return math.comb(2 * n, n)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
[50]