Given a positive integer $$$n$$$. Over all positive integers $$$x, y$$$ satisfying $$$$$$xy = n$$$$$$ find the maximum possible value of $$$|x - y|$$$ (where $$$|a|$$$ denotes the absolute value - see notes for more clarification).
The first line of input contains $$$t$$$ ($$$1 \le t \le 2 \cdot 10^5$$$) the number of test cases. The description of each test case follows.
Each test case contains one line of one integer $$$n$$$ ($$$1 \le n \le 10^9$$$), the integer described in the problem.
For each test case output one line containing one integer, the maximum value of $$$|x - y|$$$ as described in the problem.
2 4 5
3 4
The absolute value of an integer $$$a$$$ - denoted $$$|a|$$$ - is either $$$a$$$ if $$$a$$$ is non-negative, or $$$-a$$$ if $$$a$$$ is negative.
Название |
---|