added day 1 code and updated organiser

This commit is contained in:
Jake Pullen
2023-12-01 09:10:51 +00:00
parent bcffdf7429
commit 8bdfa1b167
53 changed files with 432 additions and 10 deletions
+20 -1
View File
@@ -22,4 +22,23 @@ treb7uchet
```
In this example, the calibration values of these four lines are 12, 38, 15, and 77. Adding these together produces 142.
Consider your entire calibration document. What is the sum of all of the calibration values?
Consider your entire calibration document. What is the sum of all of the calibration values?
--- Part Two ---
Your calculation isn't quite right. It looks like some of the digits are actually spelled out with letters: one, two, three, four, five, six, seven, eight, and nine also count as valid "digits".
Equipped with this new information, you now need to find the real first and last digit on each line. For example:
```
two1nine
eightwothree
abcone2threexyz
xtwone3four
4nineeightseven2
zoneight234
7pqrstsixteen
```
In this example, the calibration values are 29, 83, 13, 24, 42, 14, and 76. Adding these together produces 281.
What is the sum of all of the calibration values?