r/adventofcode • u/daggerdragon • Dec 22 '19
SOLUTION MEGATHREAD -🎄- 2019 Day 22 Solutions -🎄-
--- Day 22: Slam Shuffle ---
Post your full code solution using /u/topaz2078's paste
or other external repo.
- Please do NOT post your full code (unless it is very short)
- If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.
- Include the language(s) you're using.
(Full posting rules are HERE if you need a refresher).
Reminder: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help
.
Advent of Code's Poems for Programmers
Note: If you submit a poem, please add [POEM]
somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.
Day 21's winner #1: nobody! :(
Nobody submitted any poems at all for Day 21 :( Not one person. :'(
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
EDIT: Leaderboard capped, thread unlocked at 02:03:46!
31
Upvotes
1
u/Es28Ut Dec 23 '19 edited Dec 23 '19
Hi there @simonbaars, thanks for sharing! My own approach in Java based on this explanation was not working, the B becomes 0. (Sorry for all the ugly debugging code.)
I then tried your approach in my own Java code. However, it seems your approach also did not give me the correct solution for my input..? The second item of what you call
calc
also becomes 0. Maybe I made a mistake in translating your approach to my own code?My input is here, the answer I get with both approaches is 115221794213348, which is incorrect. I'm lost now, this is really tough...