GO Solution For UVa 10161 - Ant on a Chessboard. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

One day, an ant called Alice came to an M*M chessboard. She wanted to go around all the grids. So she began to walk along the chessboard according to this way: (you can assume that her speed is one grid per second)

At the first second, Alice was standing at (1,1). Firstly she went up for a grid, th

...

You can find the full details of the problem Ant on a Chessboard at UVa Online Judge

Sample Input

8
20
25
11
15
0

Sample Output

2 3
5 4
1 5
2 4
4 2

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985