Akash has his maths test tomorrow. He secretly found out one of the questions from the test. As the test is online, he wants to write a code that solves the question. However, he is not good at coding and thus, wants Chef to help him with that.
Chef is given a function such that the condition:
holds true for all , where is a positive integer.
For a given positive integer , find the maximum number of distinct elements in the array .
Input Format
- First line will contain - the number of test cases. Then the test cases follow.
- Each test case contains a single line of input, one integer .
Output Format
For each test case, output in a single line, the maximum number of distinct elements in the array .
Constraints
Subtasks
- Subtask 1 (30 points):
- Subtask 2 (70 points): Original Constraints.
Sample Input 1
2
2
5
Sample Output 1
1
3
Explanation
Test case : Let . Thus, . Therefore, . So, in the array , there is only distinct element.
Test case : Here, we can take . Thus . Similarly, if we take , . This means that .
However, it can be possible that the values and are distinct. Hence, the maximum number of distinct elements in the array is .
ConversionConversion EmoticonEmoticon