Are all numbers good?

A two-digit positive integer, whose sum of digits and product of digits add up to the number itself is called a good number . Find the number of good numbers .

Details and assumptions:

  • I am asking for only the first sum of digits, not the digital sum, which is an iterated process.
  • Both digits need not be distinct, but a leading zero is not allowed.

Difficulty: Small, but pointy. \boxed{\text{Difficulty: }\color{#D61F06}{\text{Small, but pointy.}} \quad \Large \color{#D61F06}{\dagger~ \dagger~ }\color{grey}{\dagger\dagger \dagger}}


The answer is 9.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Mahdi Raza
Aug 19, 2020

Use Algebra

a + b + a b = 10 a + b a ( 1 + b ) = 10 a 1 + b = 10 for a 0 b = 9 for a 0 \begin{aligned} a + b + ab &= 10a + b \\ a(1 + b) &= 10a \\ 1 + b &= 10 & \blue{\text{for } a \ne 0} \\ b&= 9 & \blue{\text{for } a \ne 0} \end{aligned}

All values of a a can take place except 0, which are { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } \{1, 2, 3, 4, 5, 6, 7, 8, 9\} , hence there are 9 \boxed{9} solutions

Python

1
2
3
4
5
6
7
8
total = 0

for a in range(1,10):
    for b in range(0,10):
        if a+b + a*b == 10*a + b:
            total = total + 1

print(total)

1
9

I don't understand the problem. Good number = a b + a + b + a b =\overline{ab}+a+b+ab

A Former Brilliant Member - 9 months, 3 weeks ago

Let the first digit be x x and the second be y y , so

x + y + x y = 10 x + y y = 9 x+y+xy=10x+y \rightarrow y=9

The second digit must be 9 9 for a two digit positive integer to be a good number. The first digit is such that 0 < x < 10 0<x<10 , so there are 9 9 possible first digits and hence 9 9 possible two digit good numbers.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...