Let the capital letters A and B be single digits that form a two-digit number when concatenated as shown below.
A B × ( A B + 1 ) % = B A
Add all the possible non-zero integer values of A and B that satisfy the equation.
NOTE: For clarification, A B and A B + 1 are consecutive numbers.
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.
Well, since A B and A B + 1 are consecutive two digit integers, you can just do the for loop once:
1 2 3 4 5 6 7 8 9 10 11 |
|
If we denote A B by n then, we observe that n ⋅ ( n + 1 ) should be divisible by 1 0 0 . Hence, we only need to check those values of n for which either n OR n + 1 are multiples of 2 5 . Simply checking leads us to the values of n being 7 5 and 9 9
Let A be x and B be y . In the left side of the equation shown in the question, the expression can be interpreted as this:
( 1 0 x + y ) × 1 0 0 1 0 x + y + 1
And as such, the right expression can be written as 1 0 y + x . With these information we can plot a graph of the equation. Since we're looking for digits as value, we only look at the values 1 to 9 of x and y . Also, we're looking for the points on the parabola that are integers with their coordinates.
In the graph , the parabola crosses integer pairs: ( 7 , 5 ) , ( 9 , 9 ) . Let's check by substituting.
7 5 × 7 6 % = 5 7 9 9 × 1 0 0 % = 9 9
We add all the values and we get 3 0 .
I missed 9 9 and lost the chance to post my solution. If you don't mind, I'm posting it here.
Let n = A B , a two digit number with digits A and B . Then B A is also a two digit number.
So 1 0 0 0 ≤ n ( n + 1 ) = n 2 + n ≤ 9 9 9 9 ⟹ 3 1 < n ≤ 9 9 , and n ( n + 1 ) must be divisible by 1 0 0 (since B A is an integer).
Since both of two consecutive numbers can't be even, one must be a multiple of 4 . Since both of two consecutive numbers can not be a multiple of 5 , one of them must be a multiple of 2 5 .
Only two pairs, namely ( 7 5 , 7 6 ) and ( 9 9 , 1 0 0 ) satisfy the given conditions. So the required sum is 7 + 5 + 9 + 9 = 3 0 .
Problem Loading...
Note Loading...
Set Loading...
Brute force Coding: