You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
342 B

#include <bits/stdc++.h>
using namespace std;
int main() {
int m, k, c = 0;
cin >> m >> k;
if (m % 19 != 0) {
printf("NO");
return 0;
}
//经典的数位分离办法
while (m) {
if (m % 10 == 3) c++;
m /= 10;
}
if (c == k) printf("YES");
else printf("NO");
return 0;
}