def decimal_to_time(time):
    """ Takes HH.MM (24 hours) as decimal, converts to HH:MM (12 hours).

    >>> decimal_to_time(13.50)
    '1:30'

    >>> decimal_to_time(8.75)
    '8:45'
    """

    time = str(time).split(".")

    # Get hour, convert to 12-hour format
    temp_hr = int(time[0]) - 1
    hpart = str(temp_hr % 12 + 1)

    # Get minutes, convert from decimal
    minutes = {0: "00", 15: "15", 3: "30", 45: "45"}
    mpart = minutes[int(0.60 * float(time[1]))]

    return "{0}:{1}".format(hpart, mpart)