社区讨论
蒟蒻40分TLE求助
P1980[NOIP 2013 普及组] 计数问题参与者 1已保存回复 0
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @ly3ypmne
- 此快照首次捕获于
- 2024/07/02 13:22 2 年前
- 此快照最后确认于
- 2024/07/02 15:52 2 年前
CPP
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int x,y;
cin>>x>>y;
string z;
for(int i=1;i<=x;i++){
string s=to_string(i);
z=z+s;
}cout<<count(z.begin(),z.end(),y+'0');
}```
回复
共 0 条回复,欢迎继续交流。
正在加载回复...