Sir i am getting wrong answer please check
i have done the coding in java
Code ide is https://ide.codingblocks.com/s/116597
Test case not passing please check
modulo property don’t hold for division operation. take mod inverse of denominator and multiply it with numerator.
but my 2 test case are passing and i didnot understand what change do i have to do in code
(a/b)%c != a%c / b%c
(a/b)%c = (a*inv(b)) % c
read about inverse of a number and modulo property in division.
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.