A
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 73 Accepted Submission(s) : 8
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
Problem Description
Potter has been a crush on Susan for long time. Recently, he finds Susan is unhappy, he thinks it is a good chance to approach her. After many efforts, he knows her problem well, but he is not good at computing. She wants to calculate the sum of some integers which are prime numbers(素数).
If you’ve read here, you probably can solve this problem, will you?
Input
Input contains an integer N(N<=200) in the first line, and then N lines follow. Each line starts with a integer M(M<100), and then M integers(x1 x2 ... xm, abs(xi)<=10000) follow in the same line.
Output
For each group of input integers you should output their sum in one line, and with one line of output for each line in input.
Sample Input
24 1 2 35 1 2 3 4 5
Sample Output
510