eolymp
bolt
Try our new interface for solving problems

Sums

Given an integer $n$, express it as the sum of at least two consecutive positive integers. For example: \begin{itemize} \item $10 = 1 + 2 + 3 + 4$ \item $24 = 7 + 8 + 9$ \end{itemize} If there are multiple solutions, output the one with the smallest possible number of summands. \InputFile The first line contains the number of test cases $t$. Each test case consists of one line containing an integer $n~(1 \le n \le 10^9)$. \OutputFile 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 \textbf{IMPOSSIBLE} instead.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3
8
10
24
Output example #1
IMPOSSIBLE
10 = 1 + 2 + 3 + 4
24 = 7 + 8 + 9
Source 2014 ACM Central Europe (CERC), Problem C