题解 | 无限长正整数排列字符串
无限长正整数排列字符串
https://www.nowcoder.com/practice/82c92d2321bb4220a3006d52a95a8bdd
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin>>n;
for(int i=1;i<=n;i++)
s+=to_string(i);
cout<<s[n-1];
}
// 64 位输出请用 printf("%lld")
查看24道真题和解析