Solution to Problem 1, HW 7

Re-write code to handle max long case....