






import numpy as np
from numpy import floataa
from numpy.typing import NDArray

def 						snake_case      (UpperCAmelCase__			,					UpperCAmelCase__						) ->       NDArray[floataa]:
  UpperCamelCase_   ,UpperCamelCase_:      Union[str, Any]					   =       np.shape(UpperCAmelCase__						)

  UpperCamelCase_:      NDArray[floataa]					   =       np.zeros((rows, 1)			,					dtype=UpperCAmelCase__						)
  for row in reversed(range(UpperCAmelCase__						)						):
    UpperCamelCase_:      Any					   =       0
    for col in range(row + 1			,					UpperCAmelCase__						):
      total += coefficients[row, col] * x[col]

    UpperCamelCase_:      Union[str, Any]					   =       (vector[row] - total) / coefficients[row, row]

  return x

def 						snake_case      (UpperCAmelCase__			,					UpperCAmelCase__						) ->       NDArray[floataa]:
  UpperCamelCase_   ,UpperCamelCase_:      Tuple					   =       np.shape(UpperCAmelCase__						)
  if rows != columns:
    return np.array(()			,					dtype=UpperCAmelCase__						)

  # augmented matrix
  UpperCamelCase_:      NDArray[floataa]					   =       np.concatenate((coefficients, vector)			,					axis=1						)
  UpperCamelCase_:      Optional[Any]					   =       augmented_mat.astype('float64'						)

  # scale the matrix leaving it triangular
  for row in range(rows - 1						):
    UpperCamelCase_:      Optional[Any]					   =       augmented_mat[row, row]
    for col in range(row + 1			,					UpperCAmelCase__						):
      UpperCamelCase_:      Optional[Any]					   =       augmented_mat[col, row] / pivot
      augmented_mat[col, :] -= factor * augmented_mat[row, :]

  UpperCamelCase_:      Any					   =       retroactive_resolution(
      augmented_mat[:, 0:columns]			,					augmented_mat[:, columns : columns + 1]						)

  return x


if __name__ == "__main__":
   import doctest

   doctest.testmod()







from math import factorial

def 						snake_case      (UpperCAmelCase__			,					UpperCAmelCase__						) ->       Dict:
  return factorial(UpperCAmelCase__						) / (factorial(UpperCAmelCase__						) * factorial(n - r						))

def 						snake_case      () ->       Optional[Any]:
  UpperCamelCase_:      int					   =       0

  for i in range(1			,					1_0_1						):
    for j in range(1			,					i + 1						):
      if combinations(UpperCAmelCase__			,					UpperCAmelCase__						) > 1E6:
        total += 1
  return total


if __name__ == "__main__":
   print(solution())