TJ
2025-03-12 20:57:03
发布于:江苏
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N;
cin>>N;
int len=2,cnt=0;
while(1){
int cur=36;
if(cnt+cur<N){
cnt += cur;
len++;
}else{
break;
}
}
int r=N-cnt,a=1,b=2;
for(int i=1;i<r;++i){
b++;
if(b>9){
a++;
b=a+1;
}
}
string res=to_string(a);
for(int i=0;i<len-1;++i){
res+=to_string(b);
}
cout<<res;
return 0;
}//47777777777777777777777777
//47777777777777777777777777
这里空空如也
有帮助,赞一个