Problem 1871. Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just started third grade a couple of weeks ago, and my math teacher is having me write out numbers in "extended form." This means that you need to write out a bunch of zeros after each digit. Adding all of those numbers together should give you the same number you started with.
The example she gave us all in class was that extended form of 10,234 is 10000+200+30+4, so you don't need to worry about writing out "0000" for the thousands place. All the numbers will be positive, since we aren't supposed to know about negative numbers yet. Thanks for your help, and please don't tell my daddy I know his Cody password!
(Edit - My daughter's a very smart girl, but she forgot to mention that your output should be a string, and there should be no spaces around the plus signs. There won't be any leading zeros in your input number either.)
Solution Stats
Problem Comments
-
2 Comments
please fix the test suite :(
Well, that's just the cutest problem description ever. :) And looking at the test suite, your teacher's giving you some mighty big numbers to work with for what (going by the tags) is third grade!
Solution Comments
Show commentsProblem Recent Solvers101
Suggested Problems
-
5600 Solvers
-
How to find the position of an element in a vector without using the find function
2728 Solvers
-
1365 Solvers
-
Determine the number of odd integers in a vector
731 Solvers
-
Back to basics - mean of corner elements of a matrix
416 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!