第26442题 单选题
下列用于寻找1~100之间因数最多的数的Python代码相关说法正确的是?

下列Python代码用于寻找1~100之间的因数最多的数及其因数,程序本意是factor变量存储形如{6:[1,2,3,6],8:[1,2,4,8]},代码如下:

factor = {}
for i in range(1, 100):
    for j in range(1, i+1):
        if i % j == 0:
            factor[i] = factor.get(i, []).append(j)
print(max(factor.items(), key = lambda x:len(x[1])))
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析