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
-
15843 Solvers
-
Return a list sorted by number of occurrences
2811 Solvers
-
1118 Solvers
-
Calculate the Hamming distance between two strings
323 Solvers
-
185 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!