Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Nearest Value by Tinus_Trotyl
def nearest_value(values: set, one: int) -> int:
return one + min((no - one for no in sorted(values)), key=abs)
April 22, 2019