Tomaz Kastrun has a fun puzzle for us:
So the game is (was) known as a TV show where then host would give a random 3-digit number and the contestants would draw 6 random numbers from stack of numbers. Given the time limit, the winner was the one who would create a formula matching the result or being closest.
Many ways, tips, tricks and optimisations were already considered, maybe the most famous was the Reverse Polish notation where operators follow their operands and is a great fit for the game.
With useless functionality, I have decided to use permuteGeneral function from RcppAlgos or same functionality could be achieved with combn function.
Click through to see it in action.