Time Limit: 2 second(s) | Memory Limit: 32 MB |
Given an integer N, you have to find the number of ways you can express N as sum of consecutive integers. You have to use at least two integers.
For example, N = 15 has three solutions, (1+2+3+4+5), (4+5+6), (7+8).
Input starts with an integer T (≤ 200), denoting the number of test cases.
Each case starts with a line containing an integer N (1 ≤ N ≤ 10^{14}).
For each case, print the case number and the number of ways to express N as sum of consecutive integers.
Sample Input |
Output for Sample Input |
5 10 15 12 36 828495 |
Case 1: 1 Case 2: 3 Case 3: 1 Case 4: 2 Case 5: 47 |
Developed and Maintained by
JANE ALAM JAN |
Copyright © 2012
LightOJ, Jane Alam Jan |