GUESSRT feb19b

What is meaning of “You should compute P⋅Q−1 modulo 109+7 , where Q−1 denotes the multiplicative inverse of Q modulo 109+7.”??

Please ask this question on the contest page and the author will answer your question if it seems sensible.

search for ‘modular division’ on internet , it is a way of representing modulus of a fraction wrt given number.

Let M=10^9+7. Suppose multiplicative inverse of Q modulo M is x. Then you should print (P*x)\%M as output.
You can google about Multiplicative Inverse. Multiplicative Inverse of an integer A modulo M is another integer B such that (A*B)\% M=1.
How to find multiplicative Inverse? Read it here.

1 Like