arr = []
arr2 = []
def test():
a = int(input())
if a != 0:
arr.append(a)
test()
else:
for i in arr:
if i % 7 == 0 and int(str(i)[-1]) == 2:
arr2.append(i)
print("Ответ:", sum(arr2))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
arr = []
arr2 = []
def test():
a = int(input())
if a != 0:
arr.append(a)
test()
else:
for i in arr:
if i % 7 == 0 and int(str(i)[-1]) == 2:
arr2.append(i)
test()
print("Ответ:", sum(arr2))