





"""simple docstring"""





def 				lowerCAmelCase_			(      SCREAMING_SNAKE_CASE       :							int   ):


							'''simple docstring'''







							if not isinstance(SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE   ) or number < 0:
														raise ValueError('''Input must be a non-negative integer'''   )

							__lowerCamelCase      :      str         =0
							while number:
														# This way we arrive at next set bit (next 1) instead of looping
														# through each bit and checking for 1s hence the
														# loop won't run 32 times it will only run the number of `1` times
														number &= number - 1
														count += 1
							return count


if __name__ == "__main__":
							import doctest

							doctest.testmod()











"""simple docstring"""





def 				lowerCAmelCase_			(      SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							int   ):


							'''simple docstring'''







							__lowerCamelCase      :      Optional[Any]         =len(SCREAMING_SNAKE_CASE   )
							__lowerCamelCase      :      Union[str, Any]         =[[0] * n for i in range(SCREAMING_SNAKE_CASE   )]
							for i in range(SCREAMING_SNAKE_CASE   ):
														__lowerCamelCase      :      Union[str, Any]         =y_points[i]

							for i in range(2    ,						SCREAMING_SNAKE_CASE   ):
														for j in range(SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE   ):
																					__lowerCamelCase      :      List[Any]         =(
																					    (xa - x_points[j - i + 1]) * q[j][i - 1]
																					    - (xa - x_points[j]) * q[j - 1][i - 1]
																					) / (x_points[j] - x_points[j - i + 1])

							return [q[n - 1][n - 1], q]


if __name__ == "__main__":
							import doctest

							doctest.testmod()




