Solve problem 43 using Go.