Playing with divisors doubt

one wrong answer other all test cases its working

@rohit_1906
You cant do divide by 2 on a number which has modulo performed to it
You need to do modulo division
Which means for 2 you need to multiply mod inverse 2 then take modulo again
Kindly fix it

i tried doing it , now 3 test cases went wrong

please correct what is wrong in this code

@rohit_1906
Minor changes required
See this solution