ques:
https://hack.codingblocks.com/contests/c/547/726
code:
https://ide.codingblocks.com/s/57836
I have tried all fast I/O options. Is there a faster algo to check primes. I have tried 3 from GFG apart from this but no luck
ques:
https://hack.codingblocks.com/contests/c/547/726
code:
https://ide.codingblocks.com/s/57836
I have tried all fast I/O options. Is there a faster algo to check primes. I have tried 3 from GFG apart from this but no luck
Your logic is Correct.
This problem has week and improper test cases
Just submit through this code
https://ide.codingblocks.com/s/57850
Basically this question was made for this primality testing