on gfg it shows from 0 to m-1 but correct answer is
1 to m-1
If B is modular multiplicative inverse of A under mod M where ( A.B=1 mod M ) . Find the exact range of B
yes you are right. i will report it to staff.
it should be [0,M-1] , as ( A.B ≡ 1 (mod m) ) means that A and B are congruent to 1 modular m , means that A%M =B%M
this means A%M takes value from [0,M-1] so B%M must take value from [0,M-1] so atleast B must be in the range of [0,M-1]