시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 8 5 1 33.333%

문제

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