Why all testcases are not passing?

Hi @uthyasani you need to use the sieve of eratosthenes method.