N. Рома и счастливые цифры

public
yeskendir.sultanov Apr 26, 2024 Never 125
Clone
Python 46.py 13 lines (11 loc) | 234 Bytes
1
n, k = map(int, input().split())
2
ans = 0
3
a = [x for x in input().split()]
4
5
for x in a:
6
cnt = 0
7
for d in x:
8
if d == '4' or d == '7':
9
cnt += 1
10
if cnt <= k:
11
ans += 1
12
13
print(ans)