The sum of digits in a two digit number formed by the two digits from $1$ to $9$ is $8$. If $9$ is added to the number then both the digits become equal. Find the number.

My attempt:

Let the two digit number be $10x+y$ where, $x$ is a digit at tens place and $y$ is the digit at unit's place. According to question:


I could not figure out the other condition. Please help. Thanks in advance.

  • 3
    $\begingroup$ $\overline{xy} = 10x+y$ is the number in question. $x+y = 8$, and $\overline{xy}+9 = 10x+y+9 = 10(x+1)+(y-1) = \overline{(x+1)(y-1)}$, and $x+1=y-1$. $\endgroup$ – 2012ssohn Jan 4 '17 at 3:12
  • $\begingroup$ @2012ssohn, what is $\overline {xy}$? How did you get to this? $\endgroup$ – pi-π Jan 4 '17 at 3:16
  • $\begingroup$ $\overline{xy}$ is a way of writing that $x$ and $y$ are digits - $xy$ could lead to some confusion as it can mean either $10x+y$ or $x \cdot y$. $\endgroup$ – 2012ssohn Jan 4 '17 at 3:18
  • $\begingroup$ @2012ssohn, It means we can either write $10x+y$ or $\overline {xy}$? $\endgroup$ – pi-π Jan 4 '17 at 3:21
  • 1
    $\begingroup$ Yes - $\overline{xy}$ is just a simpler notation of writing the same thing. If this were a five-digit number, for example, I would prefer writing $\overline{abcde}$ instead of $10000a+1000b+100c+10d+e$. $\endgroup$ – 2012ssohn Jan 4 '17 at 3:22

Let, number is of the form $10a+b$, then according to question:

$a+b=8$ and digits of $10a+b+9$ are equal.

Notice that adding $9$ to the give number will increase its tens digit by $1$ and decrease its unit digit by $1$. So,

$a+1=b-1\implies a+2=b$.

Hence, we have $a+2+a=8\implies a=3\implies b=5 \implies 10a+b=35$

  • 2
    $\begingroup$ yeah, @tilper, though it will still decrease the unit digit as 10-9, (Sort of :) :)) $\endgroup$ – I am Back Jan 4 '17 at 3:35
  • $\begingroup$ @THE LONE WOLF, Why is the digits $a+1$ and $b-1$ when $9$ is added? Why the digit at tens place increases and that at ones place decreases? $\endgroup$ – pi-π Jan 4 '17 at 4:00
  • $\begingroup$ @user354073, note the word notice that. I just checked a pattern which was clear to see. As 23+9=32, 67+9=76 etc $\endgroup$ – I am Back Jan 4 '17 at 4:27
  • $\begingroup$ @user354073 The question states the digits are in the range 1-9 (i.e. not zero). Adding 9 to any number with a nonzero units digit will cause a carry. So the tens digit becomes a+1 while the units digit becomes b+9-10=b-1 $\endgroup$ – Peter Green Jan 4 '17 at 14:46

First note that $y \ne 0$ since otherwise we would have $x + y = x + 0 = 8$, and so $10x + y = 80$, but $80$ doesn't satisfy the second condition.

Therefore we must have $1 \le y \le 9$. This means that when we add $9$ to $10x + y$, the tens digit must increase by $1$ and the ones digit decreases by $1$. So then $10x + y + 9 = 10(x+1) + (y-1)$. Since the digits are equal, we have $x+1 = y-1$. Now you just have a system of two equations in two variables:

\begin{align*} x+y &= 8\\ x+1 &= y-1 \end{align*}

  • $\begingroup$ How is $10x+y=80$? $\endgroup$ – pi-π Jan 4 '17 at 3:18
  • 2
    $\begingroup$ @user354073, I was explaining why $y \ne 0$, and part of that explanation is $10x + y = 80$. $\color{red}{\textbf{If}}$ $y = 0$, then the condition $x+y = 8$ tells us $x = 8$. Therefore $10x + y = 10(8) + 0 = 80$. But $80 + 9 = 89$ doesn't satisfy the requirement that both digits are equal when $9$ is added to the original number. Therefore $y$ can't be zero. And I wanted to show $y \ne 0$ in order for my second paragraph in the answer to work. $\endgroup$ – tilper Jan 4 '17 at 3:24
  • 1
    $\begingroup$ @tilper Nice answer. +1 $\endgroup$ – user401699 Jan 4 '17 at 3:32

The number is $35$, since $$x+y=8$$ and if $9$ is added to any number the ones digit must decrease by $1$ and the tens digit must increase by $1$ if and only if the unit digit is not $0$ hence by adding $9$ $$x+1=y-1$$ $$x-y=-2.$$ By solving both the equations we have $$x=3$$ and $$y=5$$ $$**OR**$$ The numbers whose sum of digits is equal to $8$ the numbers are $$17,26,35,44,53,62,71,80$$ and in these only $35$ is the number whose digits become equal on adding $9$

  • 2
    $\begingroup$ Nice answer. +1 $\endgroup$ – user401699 Jan 4 '17 at 3:32
  • 6
    $\begingroup$ Are you serious? This is the same as tilper's answer!!! $\endgroup$ – Rohan Jan 4 '17 at 3:45
  • 2
    $\begingroup$ @Rohan - There are only 13 minutes between the posting of the two answers. You should be aware that formatting your post correctly often takes more than 13 minutes. Thus Harsh Kumar may not have been aware of tilper's post when adding his own. $\endgroup$ – Paul Sinclair Jan 4 '17 at 17:55

Let the number be $10x + y$. Adding 9 to the number will make both the digits equal. Let that digit be $m$. Then,

$$10x+y+9=11m$$ Since $x+y=8$, $$9x=11m-17$$

Since x is an integer, $$(11m-17)\%9=0$$ $$\Rightarrow 2m\%9=8$$ $$\Rightarrow m=\{4,8.5,13 \ldots \}$$

But since $m$ is a non negative integer less than 9, $$m=4$$

And therefore, original number $=44-9=35$.

  • $\begingroup$ Can I know what $\%$ means in your answer? $\endgroup$ – Fawad Mar 31 '17 at 8:32
  • $\begingroup$ @Fawad $a%b$ gives the remainder of $a/b$.. $\endgroup$ – nidhin Mar 31 '17 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.