Solve problems 47,52 using Go.