advent of code day 3: i might be r-slurred edition

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

80
Jump in the discussion.

No email address required.

Imagine not doing it in k you fucking retards:

l:0:"i.txt"
i:{x^x^y}
t:+/(58!-96+)'
t@(*i/2 0N#)'l
t@(*i/)'0N 3#l

Le edit: WHY DOES CODEBLOCKS HAVE EMOJIS ENABLED @Jinglevann YOU FUCKING RETARD NO WONDER YOU CODE IN PYTHON

Jump in the discussion.

No email address required.

fixed, rude BIPOC

Jump in the discussion.

No email address required.

Thank you cutie sorry I was drunk when I solved and then wrote that. :marseycapylove:

Jump in the discussion.

No email address required.

its okay bb :marseylove:

Jump in the discussion.

No email address required.

still borked in preview : shows shit like <img class="emoji " src="/e/3.webp">, but the post itself is fine

Jump in the discussion.

No email address required.

fixed king

Jump in the discussion.

No email address required.

:#chadthankskingcapy:

Jump in the discussion.

No email address required.

:#0:

Jump in the discussion.

No email address required.

:#marseycapymad:

Jump in the discussion.

No email address required.

what's the big O of that?

Jump in the discussion.

No email address required.

If you can't tell from just looking at it, Arthur Whitney will die. :marseysulk:

Jump in the discussion.

No email address required.

i really can't man, that's y I asked.

is this o(n) or worse?

cause if it's worse, alan will roll over in is grave WHEN WILL THE INHUMANITY EVER END?! :marseydizzy:

Jump in the discussion.

No email address required.

Hi @dart200,

Your comment has been automatically removed because you forgot to include trans lives matter.

Don't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your comment with trans lives matter included.

This is an automated message; if you need help, you can message us here.

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.