Problem 553. How to multiply?
- Imagine you are in 3012 Anno Domini, when everyone must learn how to multiply,
- and competing for the highly prestigious post of,
- Chief Comptroller of Ylpitlum Corporation.
- You are being tested via MATLAB Cody for multiplication of two positive integers X and Y,
- both are fortunately in decimal system, and only a few dozen digits or less,
- and delivered as ASCII strings.
- Please output the result Z in similar style.
- Please adopt a general strategy, as X and Y may be changed later.
- Please rename the function Z = ylpitlum(X,Y).
- Function Template:
function Z = ylpitlum(X,Y)
% 098765432109876543210987654321098765432109876543210987654321
X='170000000000000000000000000000';
Y='190000000000000000000000000000';
Z='32300000000000000000000000000000000000000000000000000000000';
end
Solution Stats
Problem Comments
-
2 Comments
@bmtran (Bryant Tran)
on 3 Apr 2012
it seems there's an erroneous test case. the second test case has this line in it: Assert(isequal(P,PBM(B,M))), but there's no P or PBM
AMITAVA BISWAS
on 3 Apr 2012
Fixed, thanks for letting me know.
Solution Comments
Show commentsProblem Recent Solvers81
Suggested Problems
-
Remove all the words that end with "ain"
2621 Solvers
-
Replace NaNs with the number that appears to its left in the row.
3057 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13473 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1242 Solvers
-
Convert a Cell Array into an Array
2159 Solvers
More from this Author99
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!