the difference between the sum of the first 100 multiples of 8 and the sum of the first 100 multiples off 5
Answers
Answered by
2
sum_multiples_8 = sum(m for m in range(8, (100 + 1) * 8, 8))
sum_multiples_5 = sum(m for m in range(5, (100 + 1) * 5, 5))
print(sum_multiples_8 - sum_multiples_5)
Similar questions
English,
2 months ago
Physics,
2 months ago
Math,
11 months ago
Computer Science,
11 months ago
Math,
11 months ago