Problems
In chess, a queen can move any distance horizontally, vertically, or diagonally in a single move.
That is, when a queen is at the position marked X on the following chessboard,
the next positions the queen can move to are one of the shaded areas.

An
We want to place
How should the queens be placed?
Output the total number of possible cases.
Input
Input the number of queens
Output
Output the number of ways to place
Example
4
2

Tag