SP31290 MATHLOVE - Math is Love

题目描述

```   Rashid loves mathematics. He recently started to learn how the various function works in mathematics. On his journey through the math world, he came in touch with a function named Y. He also came to know that, here Y means the summation of number from 0 to n. For example if n = 5, then Y = 0+1+2+3+4+5 = 15. Now he is wondering if the knows the value of Y, can he find the value of n for the above equation? Being so very new to the math world, he could not figure out how to approach this new problem. So he came to you for help. Can you help him?   Input: First line of input will be T(1

输入格式

第一行一个正整数 $T$ ($1 \le T \le 100000$),表示有 $T$ 组数据 第 $2-T+1$ 行 每行一个正整数 $Y$($1 \le Y \le 10^9$)

输出格式

对于每个 $Y$,如果有正整数 $k$ 满足 $\sum_{i=1}^ki =y$,则输出 $k$ 的值,否则输出 `NAI`和一个换行