Question: My assignment is to write an algorithm that will find the 40000th Hardy Taxi Number within 60 seconds. This process is to find two numbers
My assignment is to write an algorithm that will find the 40000th Hardy Taxi Number within 60 seconds. This process is to find two numbers cubed that equal two other numbers cubed. essentialy :
a b, c d, a c, b d, and a^3 + b^3 = s = c^3 + d^3
The first hardy number is 1729.
I don't know how to solve this efficiently.I can use about 950MB of memory to achieve this. What should i code? Is there some trick to do this? If i store something, what do i store and how is that useful?
Some code and outline of the algorithm would be nice.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
