What is the value modulo 10 ^ 9 + 7 used in codecs and problems?

I worked on a problem that requires output like "For each line, the answer is modulo 10 ^ 9 + 7." Why is modulation 10 ^ 9 + 7 included in the problem? What is its significance?

I am not looking for a solution to the problem; only the value of this particular constant.

+4
source share
3 answers

Problems request results modulo prime numbers, because alternatives, namely a query for a floating-point result, giving "high bits" and requesting the whole result, are not always what the problem installer is looking for.

  • " " . , .
  • " ", , .
  • , , , , .
  • , " ".

10 ^ 9 + 7 . " ". :

10 ^ 9 + 7 - . , " " ; - , pq, p q , .

, 10 ^ 9 + 6, 10 ^ 9 + 7-1, . , 10 ^ 9 + 7 , , .

+15

, . , 1000000007, , .

+2

If you were asked to give an answer modulo 10 ^ 9, you could easily hide the bit, but so that the problems become more severe, a number is selected, for example, 10 ^ 9 + 7

0
source

All Articles