liuhaowei123 @ 2025-01-11 10:24:35
#include<bits/stdc++.h>
using namespace std;
int main(){
long long m,k,cnt=0;
cin>>m>>k;
for(int i=1;i<=m;m/=10){
if(m%10 == 3){
cnt++;
}
i++;
}
if(cnt == k){
cout<<"Yes";
}else{
cout<<"No";
}
}
by 1234567890sjx @ 2025-01-11 10:32:13
@liuhaowei123 for 循环中的 i<=m
应该为 m
。