Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
__ solution in Clear category for Call to Home by Cjkjvfnby
from collections import Counter
from math import ceil
def total_cost(calls: tuple):
bills = Counter()
for call in calls:
date, _, duration = call.split(' ')
bills[date] += ceil(int(duration)/60)
return sum(duration if duration < 100 else 100 + (duration - 100) * 2 for duration in bills.values())
June 14, 2014