欧拉计划-第1题

中文网:https://pe-cn.github.io/
原网址:https://projecteuler.net/
算法弱鸡。Hahaha。

在这里插入图片描述

3.5的约数问题。

_sum = 0
for num in range(1000):
    if num%3 == 0 or num%5 == 0:
        _sum += num
print(_sum)

结果是: 233168

You are the 817927th person to have solved this problem.(留下了不学无术的眼泪…)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章