Express As The Sum
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given an integer n, express it as the sum of at least two consecutive positive integers. For example:
10 = 1 + 2 + 3 + 4
24 = 7 + 8 + 9
If there are multiple solutions, output the one with the smallest possible number of summands.
Input
The first line contains the number of test cases t (1 ≤ t ≤ 50). The descriptions of the test cases follow:
Each test case consists of one line containing an integer n (1 ≤ n ≤ 10^9
).
Output
For each test case, output a single line containing the equation in the format:
n = a + (a + 1) + ... + b
as in the example. If there is no solution, output a single word "IMPOSSIBLE" instead.
Examples
Input #1
Answer #1
Submissions 476
Acceptance rate 29%