#P17222. [ICPC 2017 Nanning R] Twice Equation
[ICPC 2017 Nanning R] Twice Equation
Problem Description
For given , find the smallest no smaller than for which there exists an positive integer for which .
Input Format
This problem contains multiple test cases. The first line of a multiple input is an integer followed by input lines. Each line contains an integer .
Output Format
For each given , output the smallest . If available does not exist, output .
3
1
4
21
3
20
119