
[ad_1]
A household of your most hated Nggyupnglydown tribe has turned you right into a vampire and trapped you in a chamber with a display and a few buttons on it, and it’s important to enter the code 4, 8, 15, 16, 23, 42 (there will be numbers between) to open the door and escape. Everything within the chamber is constituted of unbreakable bedrock.
But many of the buttons had been yanked out by the Nggyupnglydown ruler Sussus Amogus, and there are solely 5 buttons left:
- Subtract 6 from the quantity
- Switch the signal of the quantity, then integer divide by 4
- Convert the quantity into its base-16 illustration, changing letters with 0 (e.g. 20 -> 14)
- Replace the on display quantity $x$ with $frac{2x+4}{x-2}$ (truncated to integer)
- Put 9 on the finish of the quantity
If the identical quantity happens 4 instances, or the quantity is larger than $2^{32}$, or a division by zero happens, the room will refill with garlic and you’ll die.
The display at present reveals $-1$, and time is operating out.
How are you able to efficiently escape the chamber?
Bonus: Can you escape the chamber if buttons 1 and 5 had been yanked out as effectively? If so, how?
[ad_2]