Sir I tried my best to solve the question but its not passing 1 test case. Please rectify where am I doing wrong.
The link for the code is :-
"Primality Testing" problem
Use Miller–Rabin algo here fermate won’t work here…
Sir, I have tried both Miller-Rabin algo and Solovay-Strassen algo but still its showing that its not passing 1 test case out of 8 test cases. Code links are below :- Miller-Rabin :- https://ide.codingblocks.com/s/84961 Solovay-Strassen :- https://ide.codingblocks.com/s/84969
because we get overflow when we multiply two large under some large modulo… whenever you are multiply two large numbers you have to take care of that… please see my code i used fermate in this. thanks…
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.