MATLAB
This is a tough one. Since we do not really know the question, the only viable method of getting the answer is by means of a global optimisation method. In this case I opted for the simulated annealing method, since this one has given me nice answers to tough questions before.
All this code is doing is looking for the optimal value of a function which input is life itself!. And the amazing thing is that it works. So, did I just validate Deep Thought?
tic;
the_answer=round(simulannealbnd(@(life)abs(3.7376696-log(life)),140489, ...
-inf,inf,saoptimset('MaxFunEvals',10^16)))
toc;
Output:
the_answer =
42
Elapsed time is 74.892428 seconds.