Let F ( x ) be a function which returns the products of the digits of x . E.g. F ( 2 7 ) = 1 4 , F ( 2 4 8 ) = 6 4 .
A is the sum of F ( x ) over all 2-digit numbers (i.e. 1 0 ≤ x ≤ 9 9 )
B is the sum of F ( x ) over all 3-digit numbers (i.e. 1 0 1 ≤ x ≤ 9 9 9 ).
Find A B
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.
The explanation could be improved upon. I don't think that someone who doesn't know how to solve this problem would be able to understand where you are coming from / why the statements are true.
exactly same way I did
The explanation could be improved upon. I don't think that someone who doesn't know how to solve this problem would be able to understand where you are coming from / why the statements are true.
Let us first find out individual value of A and B
A = n = 1 0 1 ∑ 1 0 2 f ( n ) = ( 1 × 1 ) + ( 1 × 2 ) . . . + ( 2 × 1 ) + ( 2 × 2 ) . . .
Taking the leading digits common from 1 to 9
A = 1 ( i = 1 ∑ 9 i ) + 2 ( i = 1 ∑ 9 i ) + 3 ( i = 1 ∑ 9 i ) + 4 ( i = 1 ∑ 9 i ) + 5 ( i = 1 ∑ 9 i ) + 6 ( i = 1 ∑ 9 i ) + 7 ( i = 1 ∑ 9 i ) + 8 ( i = 1 ∑ 9 i ) + 9 ( i = 1 ∑ 9 i )
A = ( i = 1 ∑ 9 i ) ( 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) = 4 5 × 4 5 = 4 5 2
Now finding B , we will remove number from 100 to 111 as all numbers in between will have a zero at 1 0 t h place. Similarly we will remove numbers between 200 and 201, 300 and 301, 400 and 401 and so on
B = n = 1 0 2 ∑ 1 0 3 f ( n ) = ( 1 × f ( 1 1 ) ) + ( 1 × f ( 1 2 ) ) . . . + ( 2 × f ( 1 1 ) ) + ( 2 × f ( 1 2 ) ) . . .
B = 1 ( f ( 1 1 ) + f ( 1 2 ) + f ( 1 3 ) . . . f ( 9 9 ) ) + 2 ( f ( 1 1 ) + f ( 1 2 ) + f ( 1 3 ) . . . f ( 9 9 ) ) + 3 ( f ( 1 1 ) + f ( 1 2 ) + f ( 1 3 ) . . . f ( 9 9 ) ) . . .
B = ( f ( 1 1 ) + f ( 1 2 ) + f ( 1 3 ) . . . f ( 9 9 ) ) ( 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) = ( 4 5 2 ) ( 4 5 ) = 4 5 3
On dividing A and B
A B = 4 5 2 4 5 3 = 4 5
The solution is very neat!! Love it
This iteration can be generalised!!
Problem Loading...
Note Loading...
Set Loading...
We can generalise this problem. Let S ( n ) be the sum over n-digit numbers.
For 1-digit numbers, the solution is: ∑ i = 0 9 i = 2 9 ( 9 + 1 ) = 4 5 .
For n-digit numbers we have: S ( n ) = ( ∑ i = 1 9 i ) S ( n − 1 ) = 4 5 S ( n − 1 ) because all n-digit numbers are equivalent to the 2-digit numbers with the digits 1 to 9 on the front.
So we therefore have that S ( n ) = 4 5 n which we can show by induction.
Back to the question: A = S ( 2 ) = 4 5 2 , B = S ( 3 ) = 4 5 3 ⇒ A B = 4 5 2 4 5 3 = 4 5