Probabilities and Modulo

Правка en1, от 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 !

Теги probabililty, modulo

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский MazzForces 2017-04-08 01:51:28 834 Initial revision (published)