Server Time: Thu Jun 22, 2017 2:16 pm
Welcome ( logout
1278 - Sum of Consecutive Integers
  PDF (English) Statistics Forum
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

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 ≤ 1014).

Output

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

 


Problem Setter: Jane Alam Jan
Developed and Maintained by
JANE ALAM JAN
Copyright © 2012
LightOJ, Jane Alam Jan