x 3 0 0 < 1 7 2 8 2 0 0 , then find the greatest possible integral value of x .
IfHint: 1 7 2 8 = 1 2 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.
Correct! Bonus question: What does the title of this problem (Quite close to Ramanujan!) mean?
1729 is the hardy–ramanujan number
I understand the solution, but how can one randomly know that 1728^200 = 12^600?
x 3 0 0 < 1 7 2 8 2 0 0 x 3 < 1 7 2 8 2 x 3 < ( 2 6 ⋅ 3 3 ) 2 x < 2 4 ⋅ 3 2 x < 1 4 4 x = 1 4 3
x 3 0 0 < 1 7 2 8 2 0 0 ⟹ x 2 3 0 0 < 1 2 3 2 0 0 ⟹ x 6 0 0 < 1 2 6 0 0 ⟹ x < 1 2 Squaring on both sides : − ⟹ x < 1 4 4
So, the greatest possible integral value of x = ( 1 4 4 − 1 ) = 1 4 3
x ^ 300 < 1728 ^ 200 300 * log ( x ) < 200 * log ( 1728 ) 3 log x < 2 log 1728 now you can binary search for the answer.
int l = 1;
int r = 1000;
double res = log(1728) * 2;
while ( l < r ) {
int mid = ( l + r ) >> 1 ;
double temp = log(mid) * 3;
if( temp < res ){
l = mid;
}
else{
r = mid - 1;
}
}
cout << l;
Why bother with that when you can just do x = 10^(2/3 * log(1728)) in like 3 seconds?
Log in to reply
Or, even better: change the above into 10^(log(1728))^(2/3) = 1728^(2/3).
Note that 1 7 2 8 2 0 0 is ( 1 2 3 ) 2 0 0 = 1 2 6 0 0 and not 1 2 3 2 0 0 , which is something ridiculous.
x 3 0 0 < 1 7 2 8 2 0 0 = 1 2 6 0 0
Take the 300th root.
x < 1 2 6 0 0 × 1 2 3 0 0 1 = 1 2 3 0 0 6 0 0 = 1 2 2 = 1 4 4
Next smallest integer x is 143 .
X^300<(12^2)^300,x^300<144^300,so x.max=143####
X^300 < 1728^200 X^3 < 1728^2 X^3 < (2^4 . 3^2)^3 X < 2^4 . 3^2 X < 144
So the greatest possible...integral value is 143
Problem Loading...
Note Loading...
Set Loading...
x 3 0 0 < 1 7 2 8 2 0 0 x 3 0 0 < 1 2 6 0 0 x < 1 2 2 x < 1 4 4 Therefore the greatest possible integral value of x is 1 4 3 .