N-Queens
In how many ways can queens be placed on an chessboard so that no two attack each other (same row, column or diagonal)?
Input
A single integer .
Output
The number of solutions.
Constraints
Sample 1
Input
4
Output
2
Sample 2
Input
1
Output
1
In how many ways can queens be placed on an chessboard so that no two attack each other (same row, column or diagonal)?
A single integer .
The number of solutions.
Input
4
Output
2
Input
1
Output
1