0
点赞
收藏
分享

微信扫一扫

python 1~300 不要偶数,不要7的倍数

i = 1
j = 0
while i <= 300:
if i %2 != 0 and i %7 != 0:
j += i
i += 1
print(j)


举报

相关推荐

0 条评论