题目描述
Yash likes playing with numbers. He has a challenge for you. Yash gives
you a number that he made by multiplying two numbers. He claims that the
possible sum of the two numbers he multiplied is as minimum as possible. He
challenges you to find that minimum sum.
Formally, for a given value of N, you are required to find the minimum sum of two distinct numbers x and y such that x, y > 0 and xy = N.
-----Input:-----
The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
Each testcase contains single integer N.
-----Output:-----
For each testcase, output minimum x + y such that x*y = N and x,y >0.
-----Constraints :-----
$1 \leq T \leq 100$
$1 < N \leq 10^{12}$
-----Sample Input:-----
1
852140
-----Sample Output:-----
1929
输入格式
见题面
输出格式
见题面