Pastebin

Paste #1230: energy

< previous paste - next paste>

Pasted by tdn

Download View as text

def E(s):
    (h, reservations) = s
    energy = 0
    for r in reservations:
        for seat in r.seats:
            energy -= seat.score
            if seat.sold > 1:
                energy += seat.sold * seat.score
    return energy

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.