ideone.com/zvnMrN
What do you think is the most complex possible test case?
it is showing time limit exceeded on test case.11 100000on ideone.what should be done then?
The definition of a prime number that you are using is:"Divisible by a number less than itself"
That set is too large. Can you make that set smaller?
how?either a array of prime numbers can be stored. but that is a tough task.
Why is that a tough task?