You've probably heard of the classic Eight Queens Puzzle. For those of you who haven't it goes something like this:
Position 8 queens on an 8×8 chessboard so that no two queens threaten each other (no two queens appear on the same row, column or diagonal as each other).
Here is one answer that is very close:
X - - - - - - -
- - - - X - - -
- X - - - - - -
- - - - - X - -
- - X - - - - -
- - - - - - X -
- - - X - - - -
- - - - - - - X
As you can see, two queens appear on the long diagonal between the top left corner and the bottom right corner.
Your task is to solve the Eight Queens Puzzle (using any programming language) in a unique or obfuscated manner. The first answer to 15 up-votes wins (the number may be subject to change depending on the popularity of this question).
Your output must be like the example above (empty squares represented by -
, queens represented by X
and a space between each X
or -
). Good luck!!