Return the number of distinct solutions to the n-queens puzzle on an n×n board.
Example 1
Input: n = 4
Output: 2
Explanation: There are 2 solutions on a 4×4 board.
Output: 2
Explanation: There are 2 solutions on a 4×4 board.
Example 2
Input: n = 1
Output: 1
Explanation: One queen on a 1×1 board.
Output: 1
Explanation: One queen on a 1×1 board.