problem5 in go