What should we print for the test
1
1 1000000005
\dfrac{2}{ 10^9 + 7} \pmod{10^9+7}
What should we print for the test
1
1 1000000005
\dfrac{2}{ 10^9 + 7} \pmod{10^9+7}
Thanks @rahul_g for pointing this out. Yeah, in this case modulo inverse does not exist. Agreed, a line stating “Modulo Inverse of Q in answers of P/Q form always exist as per test case”, should have been added in the question.