Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding
Ninjas X Naukri.com

Problem of the day

You are given two big numbers ‘A’ and ‘B’ as strings. Your task is to find the product of both the numbers.

Note:

```
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.
```

Detailed explanation

```
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
```