测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 440 字符 |
模型生成的代码 (440 字符)
from typing import List, Tuple, Dict
def unique_sublists(lst: List[List]) -> Dict[Tuple, int]:
"""
Counts the occurrences of each sublist in the given list.
Each sublist is converted to a tuple (since lists are not hashable)
and the number of times it appears is returned as a dictionary.
"""
count = {}
for sublist in lst:
t = tuple(sublist)
count[t] = count.get(t, 0) + 1
return count
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试