11607 - BigNumberMulti   

Description

Arbitrary-precision arithmetic is a common technique in scientific computing.

When we compute some numbers, the sizes of the outcomes are much bigger than the capacities of ‘int’, ‘long long’, and even ‘__int128_t’. Thus, we always use arrays for simulating our implementation.

Now, we give you two positive integers (including 0) which are not over 2000 digits, please output their multiplication.

 

Input

There is a positive integer T (1 <= T <= 1000). It means that there are T times of operation.

Continuously, there are T rows. In every row, there are two positive integers (including 0), ‘a’ and ‘b’, which are not over 2000 digits. Please compute the ‘a*b’.

Output

According to each multiplication, please output its outcome and print a new line.

When a X-digit number multiplies a Y-digit number, the digits of the outcome will be less than or equal to X+Y. For convenience, suppose that ‘a’ is X-digit, and ‘b’ is Y-digit, the output should be (X+Y)-digit, and please fill the rest of no number part with 0.

For example, you want to compute 11*11, and the outcome is 121. However, the requirement is to output a 4-digit number, so please output 0121.

Sample Input  Download

Sample Output  Download

Tags




Discuss