r/adventofcode • • 1h 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

2 Upvotes

6 comments sorted by

8

u/flwyd 1h ago

What happens if first == 20, sec == 15, and third == 10 with the_count == 25?

1

u/johnpeters42 51m ago

Or rather one == 20, two == 15, and three == 10

6

u/inadequate-gravitas 59m ago edited 48m ago

Try with these inputs:

1
2
2
3
3
3

What would you expect for the result, and how does that compare to the actual result? Can you trace through one item at a time and figure out what you’re missing?

1

u/AutoModerator 52m ago

AutoModerator has detected fenced code block (```) syntax which only works on new.reddit.

Please review our wiki article on code formatting then edit your post to use the four-spaces Markdown syntax instead.


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/AutoModerator 1h ago

Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to Help/Question - RESOLVED. Good luck!


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Apprehensive-Cow257 1h ago

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