NO the earth didn't...it was the golgafincharians who crash landed on the planet who screwed up the computers program...the answer is Deep Though who came up with the answer 42 (look at my username!) and then had to design the earth cause no one actually understood the question...Hope that pieces it altogether.
The Earth was demolished 5 minutes before the end of the 10million year program by the Vogons. However, the result (The ultimate question of life the universe and everything, to which the answer is 42) would probably have been wrong due to reasons in sft42's answer.