from random import randint
#100 випадкових чисел 0-150
arr = [randint(0, 150) for i in range(100)]
#Змінна для суми
s = 0
for i in arr:
#Умова суми чисел
if i//10<10 and i//10>=1 and i%8==0:
s += i
print(s)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
from random import randint
#100 випадкових чисел 0-150
arr = [randint(0, 150) for i in range(100)]
#Змінна для суми
s = 0
for i in arr:
#Умова суми чисел
if i//10<10 and i//10>=1 and i%8==0:
s += i
print(s)