286. Bab Al hara

Problem Statement:
Bab Alhara is the most famous T.V Show in the arab world in the last 7 years (I remember that streets of many Arabian cities were empty during the show). Anyway, people of Haret Aldabe'a have a lot of troubles with the French enemy, as the French threatened they will break into Alhara and arrest the Akeed (Colonel) Abo Shhab and his men. "Ya Batel": Abo Shhab said, he has to lock the door (bab alharra) before the French come. The door has a special password to lock which he doesn't know, but they have intel from inside the French army confirming that this password is the sum of the divisors of a very big number X. This number is the product of the strengths of the Akeeds in the Hara. Now, Abo Shhab has no time to waste so he asks for your help. Can you help him find the password of bab alharra? Can you help him and his men to protect their Hara?

Input Format:
Your program will be tested on one or more test cases. The first line of the input contains a single integer T (1  ≤  T  ≤  100) the number of test cases. Followed by T test cases. Each test case consists of two lines. The first line contains a single integer N (1  ≤  N  ≤  100), the number of Akeeds in Haret Aldabe'a. The next line consists of N integers separated by a single space: pi (1  ≤  pi  ≤  109) which refers to the power of the i-th Akeed.

Output Format:
For each test case print a single line containing "Case n:" (without the quotes) where n is the test case number (starting from 1) followed by a single space, followed by the (sum of divisors of X) modulo (109 + 7).

Sample Input:
2 5 1 2 3 4 5 3 1000 500 10

Sample Output:
Case 1: 360 Case 2: 12402312

 Added by: ahmed_aly Added at: 2014-10-11 15:00:03 UTC Time Limit: 3 seconds Partial score: No Source: ACM Egyptian Collegiate Programming Contest 2014