Rewrote factorial, int_to_array, and sum. Easy problem.