def sum_weighted_completion_times(jobs):
    """Return sum of weighted completion times."""
    total = 0
    time_so_far = 0
    for j in jobs:
        time_so_far += j[1]
        total += j[0] * time_so_far

    return total