Problem of the day
There are no leading zeros in both the strings, except the number 0 itself.
Do not use any built-in Big Integer Library.
If, A = 123, and B = 456.
So the product of both numbers will be 56088.
The first line contains an integer 'T' which denotes the number of test cases or queries to be run. Then, the T test cases follow.
The first line of each test case contains a number ‘A’ as a string.
The second line of each test case contains the number ‘B’ as a string.
For each test case, print the product of both the numbers, ‘A’ and ‘B’ in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 100
1 <= |A|, |B| <= 100
where |A| and |B| denote the length of string, ‘A’ and ‘B’ respectively.
All the characters of the string ‘A’ and ‘B’ contain digits only.
Time limit: 1 second
2
17281
91276
123
456
1577340556
56088
For the first test case:
A=17281, and B=91276
The product of both numbers is 1577340556.
For the second test case:
A=123, B=456
The product of both numbers is 56088
1
5
10
50