题解 | 无限长正整数排列字符串
无限长正整数排列字符串
https://www.nowcoder.com/practice/82c92d2321bb4220a3006d52a95a8bdd
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin>>n;
string s;
int a=1;
while(s.length()<=n){
s +=to_string(a);
a++;
}
cout<<s[n-1];
}