from scipy.constants import g






def    UpperCAmelCase__(						lowerCamelCase_							,	lowerCamelCase_  ):



			"""simple docstring"""





			if mass < 0:
						# handling of negative values of mass
						raise ValueError("The mass of a body cannot be negative"  )
			if height < 0:
						# handling of negative values of height
						raise ValueError("The height above the ground cannot be negative"  )
			return mass * g * height


if __name__ == "__main__":
			from doctest import testmod

			testmod(name='''potential_energy''')


def    UpperCAmelCase__(						lowerCamelCase_							,	lowerCamelCase_  ):



			"""simple docstring"""





			_snake_case              =      sorted(lowerCamelCase_							,	key=lambda lowerCamelCase_  : value[2]							,	reverse=lowerCamelCase_  )

			# Create a list of size equal to the maximum deadline
			# and initialize it with -1
			_snake_case              =      max(lowerCamelCase_							,	key=lambda lowerCamelCase_  : value[1]  )[1]
			_snake_case              =      [-1] * max_deadline

			# Finding the maximum profit and the count of jobs
			_snake_case              =      0
			_snake_case              =      0
			for job in jobs:
						# Find a free time slot for this job
						# (Note that we start from the last possible slot)
						for i in range(job[1] - 1							,	-1							,	-1  ):
									if time_slots[i] == -1:
												_snake_case              =      job[0]
												count += 1
												max_profit += job[2]
												break
			return [count, max_profit]


if __name__ == "__main__":
			import doctest

			doctest.testmod()

