You are viewing a single comment's thread. Return to all comments →
The only problem is that I don't know how the hell is 675/44 = 113636380 (mod 10^9 + 9).
Could anyone give me an example about how to magically turn 675 and 44 into 113636380?
Also note that 44 * 113636380 % (10**9 + 9) = 675
Since the modulo operation is not distributive over division we can't directly calculate 675/44 (mod 10^9 + 9). Instead, we find the multiplicative inverse of 44 (ie. 1/44) and use that (as discussed in the article).
Wow, thx a lot :)