There are tasks in which the answer needs to be output modulo (for example, 1000000007). Sometimes, to solve these problems, one number already divided modulo is required to be divided by another number (it can not be divided modulo yet). But in such cases, the division does not occur at all as when dividing ordinary numbers (for example, if you try to divide the number 2000000000 by the number 1000000000, but the number 2000000000, since it was already divided modulo, became the number 999 999 993 and 1000000000 is no longer divisible, but should have been). Please tell me (you can code, you can explain) how to be in this case. Thank you in advance and forgive me for my poor English.
https://cp-algorithms.com/algebra/module-inverse.html You should try to google things before making a post