Stuti and her Problem
Submissions: 1366   Accuracy:


  Difficulty: Basic   Marks: 1

Stuti is a very good dancer. She is preparing for her performance at her college fest. But unfortunately she has to submit her maths assignment just before the college fest. She has completed most of the problems but she is stuck at one. She has no clue how to solve this problem. Now she is in a dilemma of whether to prepare for her performance or try to solve that problem. She is very tensed. She needs your help to solve this problem.

Problem contains a number N(1<= N <= 1000000000). If this number is the sum of first 's' natural number then print 's' otherwise print -1.


First line denotes the number of test cases(1<= T <= 100).

And next T lines contains a single integer.



For each test case print a single integer in next line.


Sample Input: 


Sample Output:



** For More Input/Output Examples Use 'Expected Output' option **

Contributor: raj79
Author: Striver

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use, generate link and share the link here.

to report an issue on this page.