|All-time Popular Problems|
|Inorder Successor in BST|
|Maximum Product Subarray|
|Is Binary Number Multiple of 3|
|Pairwise swap elements of a linked list by swapping data|
|Largest Number formed from an Array|
|Reverse an Array|
|Boundary Traversal of binary tree|
|Leaders in an array|
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.
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.
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.