February 10, 2026

Solution for Codyssi 2025 - Absurd Arithmetic

Link to the puzzle text

Part 1

In this puzzle, we are given three operations and a list of room prices. We should first find the median price of the input and apply the operations in reverse. 

The median price is found by first sorting the prices and then taking the element in the middle. For applying the operations, we can parse them via regex, since only a few templates are used

Part 2

In part 2, we should first sum all the even prices. Afterwards, we should apply the same operations again.

We can find the sum of the even numbers easily. The applying of the operations was done in the same manner as in part 1.

Part 3

In part 3, we should find the highest price, which after applying the operations, is still under a limit. We use a function for reversing the operations starting with the upper limit. For example a power operations turns into a root operations. After each step, we round down to an integer. Once we have the upper limit for the price, we choose the highest price still under this limit.

Link to my solutions

No comments:

Post a Comment