Spec for problem5
Solve problem5