#t95. 乘法问题
乘法问题
Multiplication Problem
Problem Description
Little A has just learned multiplication. To help him practise, we give him several positive integers and ask him to multiply them all together.
For most cases Little A can work out the exact answer, but if the product exceeds , he gives up.
Write a program that tells us how Little A will answer.
Input Format
The first line contains an integer , the number of positive integers.
The following lines each contain one integer . Little A needs to multiply all the 's together.
Output Format
Print one line. If the product exceeds , output >1000000; otherwise output the product of all the numbers.
Sample Input
Sample Input 1
2
3
5
Sample Input 2
3
100
100
100
Sample Input 3
4
100
100
100
2
Sample Output
Sample Output 1
15
Sample Output 2
1000000
Sample Output 3
>1000000
Sample Explanation
For sample 1, the first line is , meaning there are two numbers. The next two lines are and ; their product is , which does not exceed , so we output .
Constraints
For all test data, and .