
'''simple docstring'''

from __future__ import annotations

__snake_case:  Optional[int]   							=			[]






def 	_snake_case						(      A_       :    list[list[int]]     ,		A_       :    int     ,		A_       :    int   ):
  """simple docstring"""







  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 	_snake_case						(      A_       :    list[list[int]]     ,		A_       :    int   ):
  """simple docstring"""







  if row >= len(A_   ):
    solution.append(A_   )
    printboard(A_   )
    print()
    return True
  for i in range(len(A_   )   ):
    if is_safe(A_     ,		A_     ,		A_   ):
      a_      :	str      =							1
      solve(A_     ,		row + 1   )
      a_      :	List[Any]      =							0
  return False






def 	_snake_case						(      A_       :    list[list[int]]   ):
  """simple docstring"""







  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"))
__snake_case:  str   							=			8
__snake_case:  str   							=			[[0 for i in range(n)] for j in range(n)]
solve(board, 0)




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




'''simple docstring'''

from math import factorial

__snake_case:  List[Any]								=			{str(d): factorial(d) for d in range(10)}






def 	_snake_case						(      A_       :    int   ):
  """simple docstring"""







  return sum(DIGIT_FACTORIAL[d] for d in str(A_   )   )






def 	_snake_case						(      ):
  """simple docstring"""







  a_      :	Union[str, Any]      =							7 * factorial(9   ) + 1
  return sum(i for i in range(3     ,		A_   ) if sum_of_digit_factorial(A_   ) == i   )


if __name__ == "__main__":
    print(F"""{solution() = }""")


