How do you find the total number of subtractions?

So I'm really confused about this problem and I am aware that the way its presented really puts it off, but I have my assumptions. Though to no avail I just can't get to the answer which is supposed to be $$24$$, I'm not even sure what topic in mathematics this falls under.

The Problem: The total number of subtractions that result in $$11111$$ remaining after a four-digit number has been subtracted from a five-digit number and the digits 1 through 9 have all been used is?

• The question is not clear to me. Could you provide an example? Are you saying that $y-x=11111$ where y is 5 digits and x is 4 four digits. If so, do you want $y,x$? Jul 2 '19 at 13:35
• That's exactly my problem, this was the only question of its kind I could find unfortunately. The answer key says that the total number of subtractions is suppose to be 24, but with the amount of information given in the problem, I'm only getting more confused the more I delve into it. Jul 2 '19 at 13:37
• the phrase "that the total number of subtractions is suppose to be 24" is puzzling! Jul 2 '19 at 15:17
• @NoChance sorry for any confusion I may have caused you, but what I meant by that phrase is that the answer to the question is suppose to be 24. Jul 2 '19 at 16:32
• No problem. It would be nice of you to reward the question and the title to reflect what you truly mean for future users. Thanks. Jul 2 '19 at 20:41

I assume you want all the pairs $$(y,x)$$ such that $$y$$ is 5 digits, $$x$$ is 4 digits, $$y-x=11111$$ and every digit from $$1$$ to $$9$$ appears either in $$y$$ nor $$x$$.
This implies that there is no digit $$0$$ in $$y$$ nor in $$x$$, so the first digit of $$y$$ must be $$1$$.
Write $$x=abcd$$ in decimal notation. Then $$y=1(a+1)(b+1)(c+1)(d+1)$$ in decimal notation. Note that there is no digit $$0$$ so the digit $$9$$ is not in $$x$$ and there is no carry-over. Moreover, note that the difference between two digits of $$x$$ must be at least $$2$$ because if it was $$1$$, then the same digit would be in $$y$$ and $$x$$ and this is impossible.
This implies that all the even digits are in $$x$$. The even digits are $$\left\lbrace 2,4,6,8\right\rbrace$$ and the number of arrengements of this is $$24$$.