BETA

Difficulty Level: Medium

Submissions: 914 Accuracy:

15.75%

Count of sum of consecutives
     

Given a number N, the task is find the number of ways to represent this number as a sum of 2 or more consecutive natural numbers.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow.
Each test case contains an integer N as input.

Output:
For each test case, print the total number of ways In new line. If the number can not be represent in the required way, print "0" without quotes.

Constraints:
1<=T<=6000
2<=N<=109

Example:
Input:
2
10
15

Output:
1
3

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

Contributor: Arun Tyagi

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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