You are not logged in. Please login at www.codechef.com to post your questions!

×

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."??

asked 07 Feb, 00:04

desmond_kaneki's gravatar image

3★desmond_kaneki
0
accept rate: 0%


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.

link

answered 07 Feb, 02:09

vichitr's gravatar image

5★vichitr
2555
accept rate: 11%

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

link

answered 07 Feb, 00:42

akash19jain's gravatar image

3★akash19jain
726
accept rate: 12%

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

link

answered 07 Feb, 01:27

harshraj22's gravatar image

4★harshraj22
605
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×422
×11

question asked: 07 Feb, 00:04

question was seen: 766 times

last updated: 10 Feb, 00:52