LearnPy Hub
← Arena
AdvancedRating 1600

Count the Queen Placements

Count the ways to place n queens on an n × n board so that no two attack each other.

Input

One integer n (1 ≤ n ≤ 10).

Output

One integer.

Sample 1

Input
1
Output
1

Sample 2

Input
4
Output
2
solution.py
Output appears here
Count the Queen Placements · Python Arena problem · LearnPy Hub