Run ID:7986

提交时间:2025-05-31 20:34:21

#include<bits/stdc++.h> using namespace std; int main(){ int m,k; cin>>m>>k; bool f;//如果m包含k个3,则f=true,否则f=false int cnt=0;//统计m中3的个数 int t=m; while(t){//统计3的个数的 if(t%10==3) cnt++; t/=10; } if(cnt==k) f=true; else f=false; //判断m是否为19的倍数 if(m%19==0 && f) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }