Problem 42307. Long-digit Subtraction
Suppose you need to subtract a very large integer from another integer. This problem requires the player to add two long digits, both supplied as strings, and to return the sum as a string. This problem similarly provides two numbers as strings and you must return the difference as a string (a - b = c). The result will always be positive as a will be larger than b. See the test suite for examples.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Extract leading non-zero digit
2175 Solvers
-
299 Solvers
-
Program an exclusive OR operation with logical operators
725 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2323 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
613 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!