3 solutions
- 1
Information
- ID
- 869
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 369
- Accepted
- 75
- Uploaded By
#include<bits/stdc++.h>
using namespace std;
bool a(int n,int m){
int s=0;
while(n){
int ge=n%10;
n/=10;
if(ge==3){
s++;
}
}
if (s>=m){
return 1;
}
else{
return 0;
}
}
int main(){
int n,m;
cin>>n>>m;
if(n%19==0 and a(n,m)){
cout<<"YES";
}
else{
cout<<"NO";
}
return 0;
}