Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
defaultdict solution in Clear category for Call to Home by rossras
from collections import defaultdict
def total_cost(calls):
d = defaultdict(int)
for call in calls:
date, _, seconds = call.split()
d[date] += (int(seconds)+59)//60
return sum(x + max(x-100, 0) for x in d.values())
Jan. 30, 2020
Comments: