1 Test Case Failed in Primality Testing

Here is my code


Can u help.

@vg5823967 Your logic is Correct.
This problem has week and improper test cases.
You can see this code ,in wich some libraries are used: https://ide.codingblocks.com/s/57850

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.

@rishabhmahajan546 can u explain the logic behind it.
and why only i=i+6

@saiKDr hey we have already checked for 3 and 2 and started with 5 and inside that checking for i and i+2 ,so all the cases cover and next checked no will start itself after adding 6,do dry run and you will find that in between i to i+6 all cases are allready handeled.

@rishabhmahajan546 yes i got thanks

@rishabhmahajan546 is this miller rabin approach?

@saiKDr no beo ,it is school method,or optimised school method.