歐拉計劃-第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.(留下了不學無術的眼淚…)

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