Originally posted by ray1993
it is impossible to do that
There are 92 different solutions for an 8x8 board with 8 queens, 12 of these are unique solutions and the remaining 80 can be found from these 12 by rotations and translations.
Here is a method for finding a solution for a nxn board with n queens (n=1 or n>3):
1. Divide n by 12. Remember the remainder (it's 8 for the eight queens puzzle).
2. Write a list of the even numbers from 2 to n in order.
3. If the remainder is 3 or 9, move 2 to the end of the list.
4. Write the odd numbers from 1 to n in order, but, if the remainder is 8, switch pairs (i.e. 3, 1, 7, 5, 11, 9, &hellip
5. If the remainder is 2, switch the places of 1 and 3, then move 5 to the end of the list.
6. If the remainder is 3 or 9, move 1 and 3 to the end of the list.
7. Place the first-column queen in the row with the first number in the list, place the second-column queen in the row with the second number in the list, etc.
A slightly more challenging problem is to place 9 queens and a pawn on a chessboard such that no queen attacks any other queen. What about placing 10 queens and 2 pawns?