Your answer is wrong (as is everyone elses so far).
Assume the combo was 40-40-40. How do you check the correct digits without trying 1-1-1, 1-1-2,1-1-3, etc?
To get 40-40-40, you have to do: 39*40*40 (combos 1-1-1 to 39-40-40) + 1*39*40 (combos 40-1-1 to 40-39-40) 1*1*1 (40-40-40) = 63961 combinations