Implement big integer multiply.

Input:

A, B : N-by-M Matrix, each row represents a positive decimal integer.

Output:

C : N-by-P Matrix, each row represents the decimal integer A*B.

Example 1:

a = [1 2 3;0 5 6];
b = [5 6;9 0];
c = BigIntMult(a,b)
c =
   6     8     8     8
   5     0     4     0

123*56=6888 (c(1,:)), 56*90=5040 (c(2,:))

Example 2 (singleton expansion):

a = [1 2 3;0 5 6];
b = [5 7];
c = BigIntMult(a,b)
c =
   7     0     1     1
   3     1     9     2

123*57=7011 (c(1,:)), 56*57=3192 (c(2,:))

Note:

1.you don't need to remove the leading zeroes.

2.your score will depend on your solution performance.

Solution Stats

131 Solutions

7 Solvers

Last Solution submitted on Sep 08, 2024

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers7

Suggested Problems

More from this Author8

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!