idk how to do multi line spoilers lol
letters = ['','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
total_score = 0
team = []
for line in open("input.txt"):
team.append(line.strip())
for i in range(2, len(team), 3):
for letter in team[i]:
if letter in team[i-2] and letter in team[i-1]:
total_score += letters.index(letter)
break
print(total_score)
some real caveman shit but it works
Jump in the discussion.
No email address required.
Still pretty easy, these get hard in week two right? I've usually forgotten that I've sworn that it was definitely happening this year by then. Can't get the code formatting right so I'm pasting the screenshot.
Jump in the discussion.
No email address required.
Me in week 1: "that was fun, my only regret is that it was a bit too short"
Me in week 3: "please make it stop I can't take it anymore"
Jump in the discussion.
No email address required.
More options
Context
More options
Context