Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
simple solution in Clear category for Call to Home by kdim
from typing import List
def total_cost(calls: List[str]) -> int:
round = lambda x: (int(x) + 59) // 60
tarif = lambda x: 2 * x - 100 if x > 100 else x
date = set(i.split()[0] for i in calls)
cost = [tarif(sum([round(c.split()[2]) for c in calls if d in c])) for d in date]
return sum(cost)
Jan. 29, 2021
Comments: