module 10^9 + 9

Posted by

TrickY 6 May 2008 01:53

I did not quite understand this part.

"calculated modulo 10^9 + 9"

What does that mean, and what is it used for...?

I know what modulo is, but I don't know what am I supposed to do with it... :)

*Edited by author 06.05.2008 01:54*

*Edited by author 06.05.2008 01:54*

*Edited by author 06.05.2008 01:54*

Re: module 10^9 + 9

There are too many solutions for larger input data, so instead of outputting "solution", you should output "solution mod 1000000009" - if you do not do that during the calculations, the number of solutions will exceed the maximum long size (approximately 2*10^9), therefore crashing your program.22

Req

I cant understand the o/p. What is the procedure actually.. How can we get 204 on the i/p 4. Can u pls explain

Re: module 10^9 + 9

There is last limit of programming language! It will be incorrect when you not use 1000000009!!!! (only 1000000009)