Toggle navigation
YouTube
Facebook
Telegram
english
english
українська
Algotester 4.3
Build 496
2024-10-17
Log In
Contact Us
College
Sponsors
Donate
Sources
Python 3
n, x = map(int, input().split()) p = list(map(int, input().split())) ans = sum([p.count(i) for i in range(10, 13)]) for i in range(9, 0, -1): cnt = p.count(i) for _ in range(cnt): if x >= 10 - i: x -= 10 - i ans += 1 print(ans)