80分求解!!!
查看原帖
80分求解!!!
1224675
qx_wuwenxuan楼主2024/12/9 12:51
#include<bits/stdc++.h> 
using namespace std;
int m,k,s=0;
int main(){
	cin>>m>>k;
	for(;m>0;m/=10) 
		if(m%10==k) s++;
	if(s==k) cout<<"YES";
	else cout<<"NO";
	return 0;
}
2024/12/9 12:51
加载中...