For a positive integer , let be the integer obtained by shifting the leftmost digit of the decimal representation of to the rightmost position.
For example, and .
For a positive rational number , we define as the smallest positive integer such that .
If no such integer exists, then is defined as zero.
For example, , and .
Let be the sum of where ranges over all ordered pairs of coprime positive integers not exceeding .
For example, .
Find . Give your answer modulo .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.