Project Euler #227: The Chase

  • + 1 comment

    See https://www.jamespking.com/posts/hackerrank-projecteuler-227-writeup/

    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).