Unsure on how to implement mod 10^9 +7

A wonderful guide to modular arithmetic

1 Like