This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Today was the first day that I gave up getting up at 5 am and tried the challenge with a good night's sleep. Before tackling the problem, I looked at the stats of the fastest solvers and saw, that the best approaches from the speed kings range between 1-3h. When reading the problem, I realized what they must have done and decided: Let's go simple. No double iterative macros, no iterative / batch combination. Let's analyze the problem and go for just one iterative - but very manual - non-scaling macro. I will go to hell for it and will definitely come back to it in the future and go for the double iterative + batch macro solution - I simply wasn't in the mood today and treated it like a one-time consulting question: You need to get the answer, no matter how and you need it fast.
Macro
Part 2
I think similar to everyone, I tried to simply increase the data type for part 2 to Int64 and afterward to FixedDecimal 50.0. Obviously, it failed, but it was worth a try. When thinking about it more carefully, I thought about last year: It had to be a mathematical solution, and there had to be a clever way to do it. I did the first iteration for the Monkey 0 on paper and simplified the problem. I spend roughly ten minutes trying an approach that would get rid of my part 1 macro entirely and replace it with a single formula but realized, I'm not JB and still not fully up. Attempt 2 was more successful and required only smaller changes to my part 1 macro - so small, that the whole macro is still exactly the same on the screenshot. For everyone working on part 2 and looking for help here: Take the sample they provide and work through it on paper and look for a mathematical pattern.
Too many loops for Part 2!!!
Not pretty today but got there without too much trouble.
Macro:
I initially misunderstood the question's counting mechanism but eventually figured out my mistake(s).
Otherwise, part 1 is not too difficult.
For part 2, I did not realise at first that there was an overflow issue and even went so far as to built and Excel simulator to debug my workflows. Once figured out that it was an overflow issue, then I solved it with a mathematical formula (hint: Smallest Common Multiplier) to reduce the dimension.
My solution involves using 2 iterative macros. On my laptop, it takes ~10min to run... and we are only D11...😂
My parsing is still really ugly. Bummed I worked from 12pm-5am called it a night running in the background for part 2 to finish at 6am.
Took a bit for P1 to figure out, but framework set up P2 was set. Just needed integer overflow fixed with mod function in spoiler
.
Well, got some heads up from others, part 2 become a bit more manageable.
It's NOT BaseA, but my version of the Abacus can solve part 2 in 20 seconds without a macro. Now that i've gotten used to it, I find it easier to solve this way than an iterative macro.
Generate Rows (It's reading a variable that is being update in the following formula tool).
Some of The VarNum/VarText Formulas: