Project Euler #213: Flea Circus

  • + 1 comment

    For output a/b, does it want a*b mod (10^9 + 7)? It says Q^(-1) which is confusing because ab^(-1) = a/b.