aoc2017day05

Run Settings
LanguagePython
Language Version
Run Command
import sys def day5(input): maze = list(map(lambda x: int(x.rstrip()), input.split())) size = len(maze) steps = 0 pc = 0 while pc >= 0 and pc < size: offset = maze[pc] maze[pc] += 1 pc += offset steps += 1 return "%d" % steps input = sys.stdin.read() print(day5(input))
Editor Settings
Theme
Key bindings
Full width
Lines