Facebook
From jutyve, 3 Months ago, written in Python.
Embed
Download Paste or View Raw
Hits: 160
  1. import requests
  2. cook = {"smth here lol"}
  3. text = requests.get("https://adventofcode.com/2024/day/1/input",cookies=cook)
  4. lit=(text.text).split("\n")
  5. a=[]
  6. b=[]
  7. for i in lit:
  8.     if not bool(i):
  9.         break
  10.     x=i.split("   ")
  11.     a.append(int(x[0]))
  12.     b.append(int(x[1]))
  13. x=0
  14. print("here")
  15. for i in a:
  16.     x+=i*(b.count(i))
  17. print(x)