POP2 - play with prime numbers (II)
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself .
we define here a new prime number called prime of primes number (POP) is a prime number that consist of other prime numbers less than this number .
1013 consist of 101 and 3 and both are primes .
2003 is not POP because leading zero not allowed .
the POP number must contain more than or equal two primes , and overlapping not allowed .
The first line contains an integer T specifying the number of test cases. (T <= 200) followed by
T lines , each line contains an integer m number 0<=m<=10^18 .
For each test case print single line contain the first integer greater than or equal to m and is (POP) .
after solving this you can try http://www.spoj.com/problems/POP3/
@abdou 00, Your problems are really awesome :)
@Robert Gerbicz.. congratulation you the first one