Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
one liner solution in Creative category for Missing Number by Sim0000
def missing_number(d: list[int]) -> int:
return(set(range(a:=min(d),b:=max(d),(b-a)//len(d)))-set(d)).pop()
print("Example:")
print(missing_number([1, 4, 2, 5]))
assert missing_number([1, 4, 2, 5]) == 3
assert missing_number([2, 6, 8]) == 4
print("The mission is done! Click 'Check Solution' to earn rewards!")
Sept. 9, 2022
Comments: