OPSL - Operation Searchlight
Some Pakistani Army helicopter wanted to launch a military operation called Operation Searchlight against Bengali civilians. They have n helicopter to lunch this mission. Each helicopter must land after flying a fixed distance. Somehow Mukti Bahini came to know about their plan. Now they want to destroy all of their helicopters. Because of that they want to create a place to destroy helicopters. If any helicopter will land that place the helicopter will destroyed in that moment. As you are a good programmer commander NAJ gives task to choose a place where they can destroyed all helicopter.
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case starts with a line containing an integer N (1 ≤ N ≤ 1000) denoting the number Helicopters. The next line contains N integers denoting the flying distance of ith Helicopter. Each helicopter must land after flying exactly a[i] (1 ≤ a[i] ≤1000000) distance.
For each case, output the case number and the desired value. If there was multiple answer print the smallest one. Since the result can be very large, you have to print the result modulo 1000000007.
Output for Sample Input
1 2 3
Case 1: 6
Case 2: 15
|Added by:||Ajharul Islam Barid|
|Cluster:||Cube (Intel G860)|
|Languages:||All except: ASM32-GCC MAWK BC C-CLANG CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GRV JS-MONKEY KTLN NIM OBJC OBJC-CLANG OCT PICO PROLOG PYTHON PYTHON3 PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET|