WHY ONLY ONE TEST CASES PASSED AND WHERE MODULAR EXONENTIATION DISCUSSED
PLEASE REPLY SIR SO LATE REPLY
it is not about updating its all about what i did is taking mod at each step
@rupeshjha909
Statement 39 - ans = a % p;
This is the first and the only instance when the value of ans variable is changed and that is when it is initialised. After this the value of ans variable is not modified. You have run a loop but that loop is useless if you do not use the modified result.
1 Like