Proper Divisors Sum

Time Limit: 1 sec

**The Problem**

A proper divisor of a positive integer N is any divisor of N other than N itself. In this problem given a positive integer number N, you need to print the sum of its proper divisors.

For example

The proper divisor of 6 are 1, 2, 3

The sum of proper divisors = 1 + 2 + 3 = 6

The proper divisor of 8 are 1, 2, 4

The sum of proper divisors = 1 + 2 + 4 = 7

**The Input**

Input begins with an integer **T (1 ≤ T ≤ 1000)**, the number of test cases, followed by **T** lines, each line containing an integer **N (2 ≤ N ≤ 10^12)**.

**The Output**

For each test case, you should print a single line “**Case X: M**”. Here **X** is the case number start from **1** to **T** and **M** is the sum of proper divisor of **N.**

**Sample Input**

2

6

8

**Sample Output**

Case 1: 6

Case 2: 7

Inter University Programming Contest - 2017 [BGC Trust University Bangladesh]

Problem Setter: Shahin ShamS