VP 59: Box IDs (30 extra)

What You Need

Any computer with Python 3. You can also use an online Python environment, such as https://colab.research.google.com

Problem Statement

Your input is a list of box IDs, each of which is a string of letters.

Your task is to find two numbers:

Multiply those two numbers together to create a checksum.

For example, if you see the following box IDs:

Of these box IDs, four of them contain a letter which appears exactly twice, and three of them contain a letter which appears exactly three times. Multiplying these together produces a checksum of 4 * 3 = 12.

What is the checksum for your list of box IDs?

VP 59.1: Checksum (15 pts)

Use this data:
https://samsclass.info/COMSC122/proj/VP59
What is the checksum for your list of box IDs?

That number is the flag.

Part 2: Similar IDs

Find two boxes will have IDs which differ by exactly one character at the same position in both strings.

For example, given the following box IDs::


abcde
fghij
klmno
pqrst
fguij
axcye
wvxyz
The IDs abcde and axcye are close, but they differ by two characters (the second and fourth).

However, the IDs fghij and fguij differ by exactly one character, the third (h and u). Those are the correct boxes.

What letters do these boxes have in common? fgij

VP 59.2: Similar IDs (15 pts)

Use the same data:
https://samsclass.info/COMSC122/proj/VP59
What letters are common between the two correct box IDs?

That string is the flag.

Source

Adapted from the Advent of Code.

Posted 11-3-25