[01] Sorting through the cargo
Intro
Ah, the glamorous life of a space captain. When you signed up to lead this mission, you probably imagined daring adventures, intergalactic discoveries, and maybe even finding fame in the history books. But before any of that, there's something far more perilous to conquer: bureaucracy.
Your mission is clear — retrieve a mysterious alien artifact rumored to hold the secrets of the universe. Sounds thrilling, right? But first, the insurance company needs their paperwork. Apparently, they won't cover "random space junk" unless you can provide a detailed inventory and a reasonable estimate of its worth.
You’ve jotted down the values of everything on board, from your trusty space wrench to that weird glowing crystal no one remembers packing. Some inventory items are priceless, others… well, let’s just say you might not miss that half-empty space ramen packet.
It’s not cost-effective to insure everything (especially that ramen packet) - you would say about half of it is mostly worthless and doesn't need to be insured. But where is "half"?
Your inventory data is a list of 1001 item values (your puzzle input).
Report the value of the item that has equally many items worth less and worth more.
Examples
For an item list [0, 0, 0, 0, 0, 0, 0, 0, 0] the answer would be 0.
For an item list [1, 2, 3, 4, 5, 6, 7, 8, 9] the answer would be 5.
For an item list [1, 4, 2, 8, 7, 6, 3, 5, 9] the answer would also be 5.
For an item list [0, 10, 2, 83, 7, 61, 4, 35, 9] the answer would be 9.
Your Input
Every user gets a unique input - if you want to try to solve it, please login.