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."?? asked 07 Feb, 00:04

Let $M=10^9+7$. Suppose multiplicative inverse of $Q$ modulo $M$ is $x$. Then you should print $(P*x)\%M$ as output. answered 07 Feb, 02:09

Please ask this question on the contest page and the author will answer your question if it seems sensible. answered 07 Feb, 00:42

search for 'modular division' on internet , it is a way of representing modulus of a fraction wrt given number. answered 07 Feb, 01:27
