SHENZHEN I/O

SHENZHEN I/O

Tesla Challenge 12: Smart Refrigerator
4 kommentarer
89o  [ophavsmand] 2. maj 2017 kl. 11:27 
Also, if you're enjoying my Tesla Challenge Pack, then stay tuned for a TIS-100 Einstein Challenge Pack.
89o  [ophavsmand] 2. maj 2017 kl. 11:26 
Done, updated.
89o  [ophavsmand] 2. maj 2017 kl. 11:22 
Here's what I thought during the creation of the puzzle (and this is what my solution does):
For any input whose tens digit is higher than 5, add 1 to the temperature. For any input whose tens digit is lower than 5, subtract 1 from the temperature. Then add 3 if the door is open. If you do this for time unit 5, you end up with a temperature of 3 (+ 3 for the door) = 6.
And yes, you're right, this isn't mathematically equivalent to taking the tens digit of the average. I'll fix it soon.
As for the rapid input changing, the Lua implementation of the puzzle makes sure the shelf contents change ONLY when the door is open (which makes sense), hence the temperature changes.
criddle.rb 2. maj 2017 kl. 6:15 
Have enjoyed the puzzles in this set - thanks.

But on this one, I'm pretty sure that the verification tab doesn't match the description. For example, why is the output 6 for time unit 5? The shelf average is 58.7, so k = 0. And how can it drop to 1 (3 time units later) when the door is still open?

Unless I'm being daft, I don't think they match up...