General Doubt regarding modulus

Lets suppose that I have to calculate (A/B)%mod, can I reduce A and B using mod and then use mod - like ((A%mod)/(B%mod))%mod and then use multiplicative inverse property to solve?

hello @deep4013

the property is as follows->

(a/b) % mod = (a%mod * inverse of b % mod ) %mod

i dont think this will hold,
put B=mod and ur expression will be not define becuase denominator will be 0

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.