diff --git a/day08.py b/day08.py index 611c4f0..c1a1fca 100644 --- a/day08.py +++ b/day08.py @@ -19,15 +19,13 @@ def runCode(lines, infinite_returns_value=False): lines_executed.add(line_pointer) command, param = lines[line_pointer].split() - param = int(param) if command == 'nop': - pass line_pointer += 1 elif command == 'acc': - accumulator = accumulator + param + accumulator = accumulator + int(param) line_pointer += 1 elif command == 'jmp': - line_pointer = line_pointer + param + line_pointer = line_pointer + int(param) return accumulator