- Solution for problem 3 in Go