


from math import cos, sin



def       lowerCAmelCase			(		lowerCAmelCase_			)->			list[list[float]]:
				lowerCAmelCase_			:   Any     					=					float(lowerCAmelCase_			)
				return [[scaling_factor * int(x == y			) for x in range(2			)] for y in range(2			)]



def       lowerCAmelCase			(		lowerCAmelCase_			)->			list[list[float]]:
				lowerCAmelCase_					,	lowerCAmelCase_			:   Any     					=					cos(lowerCAmelCase_			), sin(lowerCAmelCase_			)
				return [[c, -s], [s, c]]



def       lowerCAmelCase			(		lowerCAmelCase_			)->			list[list[float]]:
				lowerCAmelCase_					,	lowerCAmelCase_			:   Tuple     					=					cos(lowerCAmelCase_			), sin(lowerCAmelCase_			)
				lowerCAmelCase_			:   Dict     					=					c * s
				return [[c * c, cs], [cs, s * s]]



def       lowerCAmelCase			(		lowerCAmelCase_			)->			list[list[float]]:
				lowerCAmelCase_					,	lowerCAmelCase_			:   Optional[int]     					=					cos(lowerCAmelCase_			), sin(lowerCAmelCase_			)
				lowerCAmelCase_			:   Optional[int]     					=					c * s
				return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"""    {scaling(5) = }""")
print(f"""  {rotation(45) = }""")
print(f"""{projection(45) = }""")




print(f"""{reflection(45) = }""")



def       lowerCAmelCase			(		lowerCAmelCase_			)->			int:
				lowerCAmelCase_			:   Optional[int]     					=					len(lowerCAmelCase_			)
				if n in (0, 1):
								return 0
				return sum(query * (n - i - 1) for i, query in enumerate(sorted(lowerCAmelCase_			)			)			)


if __name__ == "__main__":
						import doctest

						doctest.testmod()