Python Beginner tutorial series using project Euler #10 - Summation of Primes

preview_player
Показать описание

Please don't forget to like if you liked the video and subscribe if you want to see more, thanks!

Рекомендации по теме
Комментарии
Автор

marked = [0] *
value = 3
s = 2
while value <
if marked[value] == 0:
s += value
i = value
while i <
marked[i] = 1
i += value
value += 2
print(s)

Completes it in 1.4 seconds

maxsmith
Автор

this did not work for me, the algorithm went through but it did not give me the answer i was looking for

danhayashi