Язык не указан, на Python
def get_int_seq():
while True:
k = int(input())
if k == 0: break;
yield k
return
s = sum([x for x in get_int_seq() if x mod 10 == 6])
print(s)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Язык не указан, на Python
def get_int_seq():
while True:
k = int(input())
if k == 0: break;
yield k
return
s = sum([x for x in get_int_seq() if x mod 10 == 6])
print(s)