Find the greatest 3-digt number (the first is not 0) where a b c is the number and:
a 3 + b 3 + c 3 = 1 0 0 a + 1 0 b + c
For example, 1 5 3 satisfies the conditions since 1 3 + 5 3 + 3 3 = 1 5 3 .
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.
how to SOLVE it????????
Is there any alternative way to solve this one?
do u know how to convert them to other bases for e.g. converting 407 to base 3???? @Mardokay Mosazghi
Log in to reply
@Harshi Singh Yes i do
Log in to reply
oh is it by using computer programs if not so then please tell the method
The way that I solved it is as follows(I did not include 0, so I got 371), but start with a = 9, then 729 + b^3 + c^3 = 900 + 10b + c, or b^3 - 10b = 171 + c - c^3. I made a table for c = 1 to c = 9, and computed the right hand side. Then make a table for b = 1 to b = 9 and compute b^3 - 10b. The nice thing is that the b table will be the same regardless of a. You then check for a match betweenthe b table and the c table. If none, lower a and repeat. Note that for each a, you get a new table for c, but use the same one for b. The first match came when a = 3, c = 1, and b = 7. The match was 273. Unfortunately, I neglected 0, but the scheme would work.
This are Armstrong Numbers
Here is C code
int cubes (int n) { return n^{3}; }
void main()
{
int i,j,k;
int ans;
for(i=1;i<=9;i++)
for(j=0;j<=9;j++)
for(k=0;k<=9;k++)
if((cubes(i)+cubes(j)+cubes(k))==(i*100+j*10+k))
ans = (i*100+j*10+k);
printf("%d\n",ans);
}
To solve it you may have to make a table 1^3=1. 1+0 2^3=8. 8+4 3^3=27. 7+6 4^3=64. 4+0 5^3=125 5+0 6^3=216. 6+0 7^3=343. 3+4 8^3=512. 2+6 9^3=729. 9+0 The second column gives us the overall picture that if you want that number as last digit what last digit should you left out after addition of first two digits. Now apply brute force. This method reduces no: of hit and trials by a millionth .
You can just use a program to brute-force it:
for i in range(1,10):
for j in range(0,10):
for k in range(0,10):
if 100*i + 10*j + k == i**3 + j**3 + k**3:
print str(i) + str(j) + str(k)
Problem Loading...
Note Loading...
Set Loading...
Those numbers are called Armstrong numbers, and the highest 3 digit Armstrong number is 4 0 7 = 4 3 + 0 3 + 7 3 , in base 10 the Armstrong numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407.