시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB86815494.737%

문제

Given an array of integer numbers with 5 elements and for each of its elements, find the smallest prime number which is not less than that element.

입력

The first line shows the number of test cases (T).

For each test case, we will have an array of integers (I) with length n in space-separated format.

  • 0 < I < 106
  • 0 < n < 106

출력

Print the sum of obtained prime numbers for each test case.

예제 입력 1

2
1254 12 1859 9762 6
5 6 8 10 15

예제 출력 1

12907
51