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

输出格式

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