As a graduate I went for an interview for a java development role and was doing pretty well in the technical examinations until i came up against this question.
Reframe the problem as follows: Given a standard (modern) car odometer that registers 6 digits with no fractions, find all possible values where the sum of the digits is some value, say 15. If you can solve that, you can solve the given problem.