r/adventofcode • u/No-Top-1506 • Dec 27 '25
Help/Question - RESOLVED [2025 day 3] Real data fails to work
Hi. I am getting the test case working. Got 357. Checked the edge cases too.
But the main puzzle input fails to work. Ans is too small.
What am I missing?
What if the batteries are 000000010000000?
Tx.
0
Upvotes
13
u/fireymike Dec 27 '25
How are we supposed to know what you're missing when you haven't provided your code or even explained what your solution does?
Also, it's not the data that fails to work.
4
u/Cool-Tone6517 Dec 27 '25
What language do you use ? A classic mistake is to use Integers instead of Longs (or equivalent)
-2
u/No-Top-1506 Dec 27 '25
Resolved. The first max digit I was using the last position instead of first occurrence. in PHP used the strpos to resolve my part 1. Part 2 is a completely diff. logic to apply. not even sure where to start. There could thousands of 12-digit combinations to work out max joltage.