第16534题 单选题
优化输出1~100之间能被7整除但不能同时被5整除的所有整数的Python程序,以下哪种方法运行效率最高?

以下是待优化的原Python程序:

k=1
while k<101:
    if k%7==0 and k%5 !=0:
        print(k)
    k += 1
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析