


"""simple docstring"""





def     lowercase__	(  lowerCamelCase     :  list[list[int]]				)					->     bool:
  # must be
  lowerCAmelCase__    :    List[str]								=					[list(lowerCamelCase				) for row in matrix]
  if matrix and isinstance(lowerCamelCase				,	lowerCamelCase				):
    if isinstance(matrix[0]				,	lowerCamelCase				):
      lowerCAmelCase__    :    List[Any]								=					0
      for row in matrix:
        if prev_len == 0:
          lowerCAmelCase__    :    List[Any]								=					len(lowerCamelCase				)
          lowerCAmelCase__    :    int								=					True
        else:
          lowerCAmelCase__    :    List[str]								=					prev_len == len(lowerCamelCase				)
    else:
      lowerCAmelCase__    :    Any								=					True
  else:
    lowerCAmelCase__    :    Tuple								=					False

  return result





def     lowercase__	(  lowerCamelCase     :  list[list[int]]				)					->     None:
  if check_matrix(lowerCamelCase				) and len(lowerCamelCase				) > 0:
    lowerCAmelCase__    :    Optional[Any]								=					[list(lowerCamelCase				) for row in a]
    lowerCAmelCase__    :    Optional[int]								=					len(lowerCamelCase				)
    if isinstance(a[0]				,	lowerCamelCase				):
      lowerCAmelCase__    :    Tuple								=					len(a[0]				)
    else:
      for dat in a:
        print(lowerCamelCase				)
      return

    # horizotal printing increasing
    for i in range(0				,	lowerCamelCase				):
      print(a[0][i]				)
    # vertical printing down
    for i in range(1				,	lowerCamelCase				):
      print(a[i][mat_col - 1]				)
    # horizotal printing decreasing
    if mat_row > 1:
      for i in range(mat_col - 2				,	-1				,	-1				):
        print(a[mat_row - 1][i]				)
        # vertical printing up
    for i in range(mat_row - 2				,	0				,	-1				):
      print(a[i][0]				)
    lowerCAmelCase__    :    int								=					[row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
    if len(lowerCamelCase				) > 0:
      spiral_print_clockwise(lowerCamelCase				)
    else:
      return
  else:
    print("Not a valid matrix"				)
    return





def     lowercase__	(  lowerCamelCase     :  list[list]				)					->     list[int]:
  if matrix:
    return list(matrix.pop(0				)				) + spiral_traversal(list(zip(*lowerCamelCase				)				)[::-1]				)
  else:
    return []


# driver code
if __name__ == "__main__":
   import doctest

   doctest.testmod()

   __UpperCAmelCase    				=      [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
   spiral_print_clockwise(a)




"""simple docstring"""





from math import factorial





def     lowercase__	(  lowerCamelCase     :  Dict				,	lowerCamelCase     :  int				)					->     Tuple:
  return factorial(lowerCamelCase				) / (factorial(lowerCamelCase				) * factorial(n - r				))





def     lowercase__	(  )					->     Optional[Any]:
  lowerCAmelCase__    :    List[Any]								=					0

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


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