Python
my_list = [int(input()) for i in range(8)]
res = [i for i in my_list if i % 9 == 0 and i % 8 == 0]
print(f'Кол-во чисел: {len(res)}')
print(f'Сумма чисел: {sum(res)}')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Python
my_list = [int(input()) for i in range(8)]
res = [i for i in my_list if i % 9 == 0 and i % 8 == 0]
print(f'Кол-во чисел: {len(res)}')
print(f'Сумма чисел: {sum(res)}')