-
4 Comments
Show
1 older comment
TurqoiseInt
on 13 Feb 2018
But zero is not sorted in this solution. You should get same answer for input x = 691 and 6910. (And then no need for abs())
1) 9610-0169=9441
2) 9441-1449=7992
3) 9972-2799=7173
4) 7731-1377=6354
5) 6543-3456=3087
6) 8730-0378=8352
7) 8532-2358=6174
Robert Wagner
on 7 Nov 2023
in my opinion the same result, must be 8
Robert Wagner
on 7 Nov 2023
at least a very poor problem description, it would take more time to understand it than to solve it
Suggested Problems
-
Maximum running product for a string of numbers
2204 Solvers
-
1230 Solvers
-
2209 Solvers
-
1283 Solvers
-
15800 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!