#include #define rep(i,a,b) for(int i=int(a);i> N; string s; rep(i,1,N+1){ s += to_str(i); } cout << s[N-1] << endl; }