#K68197. Find the Smallest M
Find the Smallest M
Find the Smallest M
Given a positive integer N, your task is to determine the smallest positive integer M such that the sum of the first M natural numbers is greater than or equal to N. In mathematical terms, you need to find the minimum M satisfying:
\(\frac{M(M+1)}{2} \ge N\)
Read the input from standard input and write the result to standard output for each test case.
inputFormat
The first line of the input contains a single integer T denoting the number of test cases. Each of the following T lines contains a single integer N.
Input is read from standard input (stdin).
outputFormat
For each test case, output the smallest integer M on a new line, such that:
\(\frac{M(M+1)}{2} \ge N\)
Write your output to standard output (stdout).
## sample3
3
10
14
2
4
5
</p>