kuch_bhi_ni's blog

By kuch_bhi_ni, history, 3 years ago, In English
  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Given the small constraints, you can just generate the string until the nth-ish digit by adding each number to it

str += to_string(i);

then access the nth index

I would recommend solving the harder problem, with n<10^18