AtCoder#competitive Programming
https://qiita.com/drken/items/3b4fdf0a78e7a138cd9a
- In short, to calculate a / b, you just need to find 1/b (which is called the multiplicative inverse).
- By doing so, division becomes multiplication, and you can simply calculate it using %MOD.