Probabilities and Modulo

Revision en1, by MazzForces, 2017-04-08 01:51:28

Hello,

Today, I was trying to solve this problem. The Dp behind this problem is not very difficult and is not the tricky part of the problem according to me.

The part that I have completely failed to to understand in this problem is where we are required to calculate ( Pi * 10002N%(1e9 + 7)). The author meintions in the problem statement that this (( Pi * 10002N%(1e9 + 7))) is guaranteed to be an integer.

Can somebody please provide me a proof of this or just simplify the formula ? I have complete idea about how to approach this problem with doubles without Modulo, but have no idea about doing this with the formula above. How do I calculate the probability  * 10002N%(1e9 + 7) ? Help !

Tags probabililty, modulo

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English MazzForces 2017-04-08 01:51:28 834 Initial revision (published)