蒟蒻40分TLE求助
查看原帖
蒟蒻40分TLE求助
1361535
ethan_wxc楼主2024/7/2 13:20
#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');
}```
2024/7/2 13:20
加载中...