社区讨论
70求调!!!
B2078含 k 个 3 的数参与者 3已保存回复 2
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 2 条
- 当前快照
- 1 份
- 快照标识符
- @mlnez2s6
- 此快照首次捕获于
- 2026/02/15 15:18 4 天前
- 此快照最后确认于
- 2026/02/15 23:56 4 天前
CPP
#include<bits/stdc++.h>
using namespace std;
int main(){
int k,m,cnt=0;
cin>>m>>k;
do{
if(m%10==3){
cnt++;
}
m/=10;
} while(m>0);
if(cnt==k){
cout<<"YES";
}else{
cout<<"NO";
}
return 0;
}
回复
共 2 条回复,欢迎继续交流。
正在加载回复...