LINYUHENG @ 2024-05-30 19:49:43
各位大佬,哪里错了c++
#include <bits/stdc++.h>
using namespace std;
string m;
int k,cnt;
int main(){
cin>>m>>k;
for(int i=0;i<m.size();i++){
if(m[i]==3) cnt++;
}
if(cnt==k) cout<<"YES";
else cout<<"NO";
return 0;
}
debug者有赏
by Dragon0926 @ 2024-05-30 19:57:59
@LINYUHENG m是string类型 应该是m[i]=='3'吧
by LINYUHENG @ 2024-05-30 19:59:38
@Dragon0926 谢谢,已AC