For every natural , let be the smallest natural such that ends with and is a multiple of 7. For instance, , , , …, , , , , , … Let be the infinite concatenation of for every , that is, . Which is the -th digit of ?
Input consists of several cases, each with a natural between 1 and .
For every , print the -th digit of (starting at one).
Author: Salvador Roura
Generation: 2026-01-25T11:55:25.375Z
© Jutge.org, 2006–2026.
https://jutge.org