عدد تقریبا خوششانس
#022 · Nearly Lucky Number · strings · medium · python مشاهده راهحل در GitHub Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For Example numbers: 47, 477, 4 are lucky and 5, 17, 467 are not. Unfortunately, not all numbers are lucky. Petya calls a number nearly lucky if the number of lucky digits in it is a lucky number. Input: the only line contains an integer n (1 Because Count of lucky number in 400447 is a lucky number also (4)! ### Example Input: 7747774 ### Example Output: YES ### Example Input: 1000000000000000000000000000 ### Example Output: NO