Solve hw3-1