#Z14206. 含k个3的数
含k个3的数
Description
Enter two positive integers m and k, where 1 < m < 100000 and 1 < k < 5. Determine whether m is divisible by 19 and contains exactly k instances of the digit '3'. If the conditions are satisfied, output YES; otherwise, output NO. For example, if the input is 43833 3, the conditions are met, so the output is YES. If the input is 39331 3, even though there are three '3's, the number is not divisible by 19, so the output should be NO.
Input Format
The values of m and k, separated by a single space.
Output Format
Output YES if the conditions are satisfied, otherwise output NO.
43833 3
YES