Add problem5 solution