Problem

Source: 44th International Tournament of Towns, Senior O-Level P2 and Junior O-Level P4, Spring 2023

Tags: floor function, number theory



А positive integer $n{}$ is given. For every $x{}$ consider the sum \[Q(x)=\sum_{k=1}^{10^n}\left\lfloor\frac{x}{k}\right\rfloor.\]Find the difference $Q(10^n)-Q(10^n-1)$. Alexey Tolpygo