Proper Divisors Sum
Time Limit: 1 sec
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.
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
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).
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.
Case 1: 6
Case 2: 7
Inter University Programming Contest - 2017 [BGC Trust University Bangladesh]
Problem Setter: Shahin ShamS