a = []
while 1:
n = int(input())
if not n: break # n == 0
a.append(n)
print(sum(i for i in a if not i%4 and i%10==8))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
a = []
while 1:
n = int(input())
if not n: break # n == 0
a.append(n)
print(sum(i for i in a if not i%4 and i%10==8))