第25588题 单选题
判断统计1-999中与5有关数的Python代码相关说法的正确性

与5有关的数定义为含有5或者能被5整除的数。

cnt = 0
for i in range(1,1000):
   if i % 5 == 0:
      cnt += 1
      continue
   j = i
   while j > 0:
       if j % 10 == 5:
          cnt += 1
          break
       else:
          j //= 10
print(cnt)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析