sum = 0
for i in range(100, 1000):
digit_sum = sum(int(digit) for digit in str(i))
if digit_sum % 8 == 0:
print(i)
sum += i
print("Сума чисел:", sum)
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
sum = 0
for i in range(100, 1000):
digit_sum = sum(int(digit) for digit in str(i))
if digit_sum % 8 == 0:
print(i)
sum += i
print("Сума чисел:", sum)