Problem 3 in Go and some cosmetic changes.