https://www.codechef.com/FEB18/problems/BROCLK. This is the link of current codechef challenge.
In the output format it's written that "Let's denote the modular inverse of $q$ (it's guaranteed that the modular inverse exists and is unique) by $r$.". I am having difficulty in understanding this line because I have always read modular inverse of a number with respect to another number.
Is it there a default divisor which we use in case it's not present.I am not asking for solution of problem just the language issue.Please help.
It means
$$r \equiv q^{-1} \pmod{10^9+7}$$
The reason why they stated $\gcd(q, 10^9+7)$ exists is to ensure that $q^{-1} \pmod{10^9+7}$ exists.