题目描述
Sandu, a teacher in Chefland introduced his students to a new sequence i.e.
0,1,0,1,2,0,1,2,3,0,1,2,3,4........
The Sequence starts from 0 and increases by one till [MATH0], then repeat itself with $i$ changed to $i+1$
Students being curious about the sequence asks the Nth element of the sequence. Help Sandu to answer the Students
-----Input:-----
- The first-line will contain $T$, the number of test cases. Then the test case follows.
- Each test case contains a single numbers N.
-----Output:-----
Print the Nth element of the sequence
-----Constraints-----
- $1 \leq T \leq 1000$
- $1 \leq N \leq 10^{18}$
-----Sample Input:-----
5
8
9
20
32
109
-----Sample Output:-----
2
3
5
4
4
输入格式
见题面
输出格式
见题面
样例输入
['5', '8', '9', '20', '32', '109']
样例输出
['2', '3', '5', '4', '4']