Count of sum of consecutives
Submissions: 4124   Accuracy:

19.37%

  Difficulty: Medium   Marks: 4

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
Author: arun03


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 ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.