this post was submitted on 01 Dec 2023
7 points (100.0% liked)

Advent Of Code

802 readers
30 users here now

An unofficial home for the advent of code community on programming.dev!

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

AoC 2024

Solution Threads

M T W T F S S
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 18 20 21 22
23 24 25

Rules/Guidelines

Relevant Communities

Relevant Links

Credits

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

console.log('Hello World')

founded 1 year ago
MODERATORS
 

What is the intended correct calibration value for the following line?:

five3onelxjninenine45

Reading the instructions strictly the answer should be 35.

However, puzzle makers often try to be "clever" by creating intentionally poor instructions. Which makes me think they might want the answer to be 55.

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 1 year ago

For part 1 it is 35.

For part 2 it is 55

[–] mac 4 points 1 year ago

This should be just 35, you can ignore the words that are numbers

[–] [email protected] 1 points 1 year ago

First and last number, so loop through the characters, ask is it a letter or a number. Find the first and last number in the string and add the strings together and convert it to a number. So you find a 3,4,5 in the line so find the first in the result is 3 and 5 is the last so it becomes 35.