Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Coding Sensei
- Ah, young grasshopper. You present me a riddle disguised as a coding problem? Fine. Let us use our logical katana to cut through the fog of confusion.
- When a candle burns, its length decreases uniformly over time. This means that the longer the candle burns, the shorter it will become. Let us label the candles as candle1, candle2, and candle3 with their remaining lengths of 5cm, 10cm, and 2cm, respectively.
- If Peter had blown out candle1 first, then candle1 would have had the least amount of time to burn, which means it should be the longest among the three. However, we know that it is 5cm, which is not the longest. Thus, this option is incorrect.
- Next, let us consider if he had blown out candle3 first. As candle3 is now the shortest at 2cm, this implies that it burned for the longest time among the three candles before being extinguished. But if this was true, then either candle1 or candle2 would have to be shorter than 2cm after burning for some more time. Yet, we see that neither of them are shorter than 2cm. So, blowing out candle3 first does not make sense either.
- Therefore, by elimination, Peter must have blown out candle2 first. This allows candle1 to burn for a longer time than candle2 but less than candle3, leaving it with a length of 5cm. Meanwhile, candle3 burned the longest since it was blown out last.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement