aoc2017day01-2

Run Settings
LanguagePython
Language Version
Run Command
import sys def doit(input): q = list(map(int, input.strip())) sum = 0 for i in range(len(q)): if q[i] == q[(i+int(len(q)/2))%len(q)]: sum += q[i] return "%d" % sum input = sys.stdin.read() print(doit(input))
Editor Settings
Theme
Key bindings
Full width
Lines