POP1  play with prime numbers (I)
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 .
example :
1013 consist of 101 and 3 and both are primes .
notes :
2003 is not POP because leading zero not allowed .
the POP number must contain more than or equal two primes , and overlapping not allowed .
Input
The first line contains an integer T specifying the number of test cases. (T <= 10^4) followed by
T lines , each line contains an integer m number 0<=m<=10^9 .
Output
For each test case print single line contain the first integer greater than or equal to m and is (POP) .
Example
Input:
3
10
100
1000
Output:
23
113
1013
after solving this you can try http://www.spoj.com/problems/POP2/
hide comments
Mitch Schwartz:
20130610 06:11:34
@fitcat: [snip]


fitcat:
20130610 05:42:32
@abdelkarim: I am not aware I can do this. I will disqualify all of them. Sorry for everyone.


abdelkarim:
20130610 03:29:56
@fitcat


fitcat:
20130610 03:14:11
@Mitch: I use the 2nd account mainly to help people in the forum. Verified what they said by submitting their code. Tried to figure out the problem. Make sure the correctness by submitting the modified code until AC. Finally, gave them hints. I encountered one claiming WA but in fact getting AC without changes. I don't want this kind of activities "pollute" my real account.


Mitch Schwartz:
20130608 13:59:10
@fitcat: You know that solving a classical problem with two accounts makes it worth less points, right? (It doesn't matter if one of the accounts is excluded from global rank list.) 

fitcat:
20130607 05:47:41
@abdelkarim: What I want to say is that the definition is not clear. Without the notes section, is the current definition precise enough? Surely not. Hence, the conditions in the notes section have to be included into the definition. 

abdelkarim:
20130606 17:07:19
@fitcat :


fitcat:
20130606 17:07:19
@Mitch: As said in the notes section, POP must consist of 2 or more distinct prime numbers. The condition "less than this number" is irrelevant, I believe.


Mitch Schwartz:
20130606 17:07:19
@fitcat: For example in explaining the answer for 10 being 23: 2 and 3 are both less than 23. (We do not care whether or not 2 and 3 are less than 10.) 
Added by:  abdou_93 
Date:  20130605 
Time limit:  2s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  owner 