This commit is contained in:
DUEFON 2022-12-05 19:50:37 +01:00 committed by Eivind Øksnevad
parent dee7f57b2a
commit f00c25db26
1 changed files with 13 additions and 0 deletions

13
three.py Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
from useful import *
def stuff(l):
d = {x: True for x in l[:len(l)//2]}
return next(x for x in l[len(l)//2:] if d.get(x))
def points(c):
o = ord(c)
return 27 + o - ord('A') if o < ord('a') else 1 + o - ord('a')
#ic([points(stuff(l)) for l in lines(open(0))])
print(sum(points(stuff(l)) for l in lines(open(0))))