Skip to content

Instantly share code, notes, and snippets.

@thrasibule
Created December 2, 2021 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thrasibule/1b8fe3a398d9d1fbd483bf88c9af2c8c to your computer and use it in GitHub Desktop.
Save thrasibule/1b8fe3a398d9d1fbd483bf88c9af2c8c to your computer and use it in GitHub Desktop.
from collections import Counter
d = sum((Counter({w:int(n)}) for w, n in map(str.split, open("input"))), Counter())
print(d["forward"] * (d["down"] - d["up"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment