-= Prologue: BitFlop Internship =-
To avoid getting in the same troubles in your vacation last year, you decide to earn some money by getting a job.
But wait, you don't have any experience! You have to get an internship first.
You decide to apply for an internship at BitFlop Laboratories, a cutting-edge tech company known for its groundbreaking research in flip-flop circuits.
Even thought there are some questionable ethics and the internship is unpaid, you need this internship to get your foot in the door of the tech industry.
Theres an application process (trial period), consisting of twelve days of puzzles and tasks to complete.
For every task you complete during your internship trial period you'll earn BitFlips ~, the currency used at BitFlop Laboratories.
Over the course of the next twelve puzzles you're going to try to earn enough BitFlips to secure your internship position.
Each puzzle has 3 parts, each part harder than the last.
Solving each part will earn you 1 BitFlip.
Can you earn all 36 BitFlips in time?
Finishing all the puzzles will surely get you an unpaid internship at BitFlop Laboratories!
Good luck!
-= Puzzle 1: Coffee Brewing =-
Your first day as trial intern at BitFlop Laboratories has finally arrived!
Naturally, your first assignment involves cutting-edge technology, world-changing research, and groundbreaking innovation...
...just kidding. You're making coffee.
Not even for yourself either. You're brewing coffee for all your coworkers as well, because you are the intern and that's what interns do (at least in the movies).
Before you is a list of numbers (your puzzle input), each number represents the temperature of a cup of coffee.
For example:
41
87
93
104
46
102
65
105
81
36
66
46
60
65
64
64
61
73
55
69
A cup of coffee must be atleast 60 degrees to be considered drinkable.
The cups of coffee that are below 60 degrees need to be reheated, which takes time and energy.
It takes 1 second to heat a cup of coffee by 1 degree. For example, reheating a cup of coffee from 55 degrees to 60 degrees takes 5 seconds.
This means for the example above, the time it takes to reheat each cup of coffee is this:
41 (needs 19 seconds)
87
93
104
46 (needs 14 seconds)
102
65
105
81
36 (needs 24 seconds)
66
46 (needs 14 seconds)
60
65
64
64
61
73
55 (needs 5 seconds)
69
In total for the example above, you spend 76 seconds reheating the cold cups that are below 60 degrees.
How many seconds does it take to (re)heat all the cups of coffee one by one?