Solved problem 029 without bigint, double, or strings!