# The clock shows 'h' hours, 'm' minutes and 's' seconds after midnight.
# Your task is to make the 'past' function return the time converted to milliseconds.
# More examples in the test cases below.
from datetime import time


def past(h, m, s):
    # conversion to time object provides all necessary value checks and
    # allows to easily extend it to count daylight saving etc. if needed
    t = time(h, m, s)
    ms = (t.hour * 3600 + t.minute * 60 + t.second) * 1000
    return ms
