As this is your homework I'm not going to give you clear advice nor a ready to use solution.
seems you are about missing the job as you have chosen all longer times, so rethink that
think about in which order you wannt to compare which values
which way do you know how to assign times and machines, so it would be easier to you to get the machine to use while knowing it's time spent on a job?
when you know about all the above you could very quick sort lists (or even hash values) when using the Schwartzian Tranform
Have a nice day
All decision is left to your taste