Solve problem 34 using Go.