N-queens placement count

Write codeHard25 minGoogle style

Your task

Return the number of distinct ways to place n non-attacking queens on an n x n chessboard (no two share a row, column, or diagonal). 1 <= n <= 9.

Examples

n_queens_count(n: int) -> int
Example 1
Inputn_queens_count(4)
Output2