~~~#include <bits/stdc++.h>
using namespace std;

int main()
{ 	long long m,k,c=0,d,z;
	cin>>m>>k;
	z=m;
	while(z>0){
		d=z%10;
		z/=10;
		if(d==3)c++;
	}
	if(c==k||m%19==0)cout<<"YES";
	else if(c!=k&&m%19!=0)cout<<"NO";
	return 0;
 }

2 comments

  • 1

Information

ID
584
Time
1000ms
Memory
256MiB
Difficulty
2
Tags
(None)
# Submissions
118
Accepted
70
Uploaded By