





from __future__ import annotations

_SCREAMING_SNAKE_CASE      	=		[]


def 							SCREAMING_SNAKE_CASE__						(    __a   , __a   , __a   ):
	for i in range(len(__a   )   ):
		if board[row][i] == 1:
			return False
	for i in range(len(__a   )   ):
		if board[i][column] == 1:
			return False
	for i, j in zip(range(__a   , -1   , -1   )   , range(__a   , -1   , -1   )   ):
		if board[i][j] == 1:
			return False
	for i, j in zip(range(__a   , -1   , -1   )   , range(__a   , len(__a   )   )   ):
		if board[i][j] == 1:
			return False
	return True


def 							SCREAMING_SNAKE_CASE__						(    __a   , __a   ):
	if row >= len(__a   ):
		solution.append(__a   )
		printboard(__a   )
		print()
		return True
	for i in range(len(__a   )   ):
		if is_safe(__a   , __a   , __a   ):
			snake_case_		:			List[str]											=	1
			solve(__a   , row + 1   )
			snake_case_		:			Tuple											=	0
	return False


def 							SCREAMING_SNAKE_CASE__						(    __a   ):
	for i in range(len(__a   )   ):
		for j in range(len(__a   )   ):
			if board[i][j] == 1:
				print('Q'   , end=' '   )
			else:
				print('.'   , end=' '   )
		print()


# n=int(input("The no. of queens"))
_SCREAMING_SNAKE_CASE      	=		8
_SCREAMING_SNAKE_CASE      	=		[[0 for i in range(n)] for j in range(n)]
solve(board, 0)


print("""The total no. of solutions are :""", len(solution))








def 							SCREAMING_SNAKE_CASE__						(    __a   ):
	if not isinstance(__a   , __a   ):
		raise ValueError('Input must be an integer'   )
	if input_num <= 0:
		raise ValueError('Input must be positive'   )
	return sum(
	    divisor for divisor in range(1   , input_num // 2 + 1   ) if input_num % divisor == 0   )


if __name__ == "__main__":
						import doctest

						doctest.testmod()

