Defaulters

0

0 votes
Easy
Problem

Predict answer and write code from given test cases.
Sample Input 1
6
9901 9907 9929 9931 9967 9973
Sample Output 1
9923 9941 9949

Sample Input 2
3
97 103 109
Sample Output 2
101 107

Sample Input 3
7
1499 1523 1543 1553 1567 1579 1597
Sample Output 3
1511 1531 1549 1559 1571 1583

Sample Input 4
6
2003 2011 2017 2027 2029 2039
Sample Output 4
-1

Constraints:

  • Numbers are in increasing order
  • 1 < n < 10001
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?