import java.util.*; public class Main { static int cnt, N; static int[] arr; public static void main(String[] args) { Scanner input = new Scanner(System.in); N = input.nextInt(); arr = new int[N]; nQueen(0); System.out.println(cnt); } private static void nQueen(int next){ if(next == N) { cnt++; return; } for(int i = 0; i < N; i++){ arr[next] = i; if(Possibility(next)){ nQueen(next + 1); } } } pr..