Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Call to Home by flpo
from collections import defaultdict
from math import ceil
def total_cost(calls):
daily_minutes = defaultdict(lambda: 0)
for call in calls:
day, _, duration = call.split(' ')
daily_minutes[day] += ceil(int(duration) / 60)
return sum((2*m - min(m, 100)) for m in daily_minutes.values())
Sept. 26, 2017
Comments: