def tt(hhmm):
    hour, minute = divmod(int(hhmm), 100)
return min_time.replace(hour=hour, minute=minute)
assert find_value(tt('0100'), tt('0200')) == 1200
assert find_value(tt('0100'), tt('0400')) == 4200
Getting values for time periods