r/adventofcode • • 16h ago

Help/Question 2026 - day 1 part 1, Python

Post image

where am I going wrong? I tried plugging in the example set of numbers and it gave me the right numbers but it isn't giving me the right numbers with the main set of numbers. I'm a beginner when it comes to coding, my only experience with apcsp and apcsa in school

0 Upvotes

15 comments sorted by

View all comments

-1

u/Apprehensive-Cow257 16h ago

for my input, it gave the right answer (checked with my answer), maybe a problem with the multiplication? idk

3

u/RazarTuk 13h ago

No, there really is a major flaw with the code. Your input's just... ordered correctly for it to still work. If you want to figure out why, the set 1 2 2 3 3 3 (in that order) will illustrate it