Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- l=[x.splitlines() for x in open("input").read().split("\n\n")]
- def refl(p):
- for i in range(1, len(p)):
- if all(x==y for x,y in zip(p[:i][::-1],p[i:])):
- return i
- return 0
- print(sum(refl(x)*100+refl(list(zip(*x))) for x in l))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement