Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Call to Home solution in Clear category for Call to Home by Wakko_Warner
from typing import List
def total_cost(calls: List[str]) -> int:
import math
d = {}
for c in calls:
dt, _, secs = c.split()
d[dt] = d[dt] + math.ceil(int(secs)/60) if dt in d else math.ceil(int(secs)/60)
return sum(max(v, v*2 -100) for v in d.values())
Feb. 2, 2021