Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Day 1
- Part 1
- print(max(sum(map(int,x.split()))for x in open('input.txt').read().split('\n\n')))
- Part 2
- print(sum(sorted(sum(map(int,x.split()))for x in open('input.txt').read().split('\n\n'))[-3:]))
- Day 2
- Part 1
- print(sum(map(lambda x: x[1]+4 if (x[1]==x[0]) else (x[1]+1 if x[1]==(x[0]-1)%3 else x[1]+7),[(ord(a)-ord("A"),ord(b)-ord("X")) for a,b in [l.split() for l in open("input.txt").read().split("\n")]])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement