WA in Prime 1

Link to Question : http://www.spoj.com/problems/PRIME1/

my code shows wa .

i have tried all test case

here is link to my code :

Your code fails here i believe-

Input
1
2 4

Output
3

Expected Output

2
3

Cross check your array and printing conditions.

1 Like

Ok thanxs!