Pro.ID21813 TitleData Processing Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21813 AC14 Submit121 Ratio11.57% 时间&空间限制描述Chinachen is a football fanatic, and his favorite football club is Juventus fc. In order to buy a ticket of Juv, he finds a part-time job in Professor Qu's lab. And now, Chinachen have received an arduous task —— Data Processing. The data was made up with N positive integer (n1, n2, n3, … ), he may calculate the number , you can assume . Because the number is too big to count, so P mod 1000003 is instead. Chinachen is puzzled about it, and can't find a good method to finish the mission, so he asked you to help him. 输入The first line of input is a T, indicating the test cases number. There are two lines in each case. The first line of the case is an integer N, and N ≤ 40000. The next line include N integer numbers n1, n2, n3 … ( ni ≤ N ). 输出Description Chinachen is a football fanatic, and his favorite football club is Juventus fc. In order to buy a ticket of Juv, he finds a part-time job in Professor Qu's lab. And now, Chinachen have received an arduous task —— Data Processing. The data was made up with N positive integer (n1, n2, n3, … ), he may calculate the number , you can assume . Because the number is too big to count, so P mod 1000003 is instead. Chinachen is puzzled about it, and can't find a good method to finish the mission, so he asked you to help him. Input The first line of input is a T, indicating the test cases number. There are two lines in each case. The first line of the case is an integer N, and N ≤ 40000. The next line include N integer numbers n1, n2, n3 … ( ni ≤ N ). Output For each test case, print a line containing the test case number ( beginning with 1) followed by the P mod 1000003. Sample Input 2 Sample Output Case 1:4 Hint You may use "scanf" to input the data. Source 样例输入2 样例输出Case 1:4 提示You may use "scanf" to input the data. |