


"""simple docstring"""



def     __lowerCAmelCase		(		lowercase    :    Dict					)      ->		tuple[int, int]:


    """simple docstring"""





    try:
        snake_case       : Tuple    =       float(lowercase__					)
    except ValueError:
        raise ValueError("Please enter a valid number"					)
    snake_case       : Optional[int]    =       decimal - int(lowercase__					)
    if fractional_part == 0:
        return int(lowercase__					), 1
    else:
        snake_case       : List[str]    =       len(str(lowercase__					).split("."					)[1]					)
        snake_case       : str    =       int(decimal * (10**number_of_frac_digits)					)
        snake_case       : List[Any]    =       10**number_of_frac_digits
        snake_case       : str    =       denominator, numerator
        while True:
            snake_case       : Dict    =       dividend % divisor
            if remainder == 0:
                break
            snake_case       : Optional[int]    =       divisor, remainder
        snake_case       : Tuple    =       numerator / divisor, denominator / divisor
        return int(lowercase__					), int(lowercase__					)


if __name__ == "__main__":
  print(F'''{decimal_to_fraction(2) = }''')
  print(F'''{decimal_to_fraction(89.0) = }''')
  print(F'''{decimal_to_fraction("67") = }''')
  print(F'''{decimal_to_fraction("45.0") = }''')
  print(F'''{decimal_to_fraction(1.5) = }''')
  print(F'''{decimal_to_fraction("6.25") = }''')
  print(F'''{decimal_to_fraction("78td") = }''')








"""simple docstring"""

from __future__ import annotations

_UpperCamelCase		     =    []



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



def       SCREAMING_SNAKE_CASE							( lowercase__					,					lowercase__   )			->						bool:
 if row >= len(lowercase__   ):
  solution.append(lowercase__   )
  printboard(lowercase__   )
  print()
  return True
 for i in range(len(lowercase__   )   ):
  if is_safe(lowercase__					,					lowercase__					,					lowercase__   ):
   lowerCAmelCase__   :				List[Any] 			=				1
   solve(lowercase__					,					row + 1   )
   lowerCAmelCase__   :				Dict 			=				0
 return False



def       SCREAMING_SNAKE_CASE							( lowercase__   )			->						None:
 for i in range(len(lowercase__   )   ):
  for j in range(len(lowercase__   )   ):
   if board[i][j] == 1:
    print("Q"					,					end=" "   )
   else:
    print("."					,					end=" "   )
  print()


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






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






