Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1871. Numbers in extended form

Created by James

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.)

Problem Group

Solution Statistics

23 correct solutions 10 incorrect solutions
Last solution submitted on Dec 12, 2014

Problem Comments