Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Internet Plan by jullios1104
def internet_quota(X: int, used: list[int]) -> int:
return X+X*len(used)-sum(used)
print("Example:")
print(internet_quota(200, [150, 220]))
# These "asserts" are used for self-checking
assert internet_quota(200, [150, 220]) == 230
assert internet_quota(100, [50, 80, 30]) == 240
assert internet_quota(150, [120]) == 180
print("The mission is done! Click 'Check Solution' to earn rewards!")
Sept. 24, 2024