Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ll inv(ll a, ll m)
- {
- if (a == 1)
- return 1;
- return ((1 - inv(m % a, a) * m) / a) + m;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement