We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It says P X Q(-1) mod (10^9 + 7), which makes very little sense as sample output is just single number, e.g. if I try 1.0000 instead - it will be wrong. Plus as number of cells is restricted to 40 x 40, final result will never be over 1600; which makes mod statement somehow reflecting precision of result.
Please, help.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #213: Flea Circus
You are viewing a single comment's thread. Return to all comments →
Can somebody clearify output format?
It says P X Q(-1) mod (10^9 + 7), which makes very little sense as sample output is just single number, e.g. if I try 1.0000 instead - it will be wrong. Plus as number of cells is restricted to 40 x 40, final result will never be over 1600; which makes mod statement somehow reflecting precision of result.
Please, help.