Explorar o código

Day 16 line width

Taddeus Kroes %!s(int64=7) %!d(string=hai) anos
pai
achega
264b82a882
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      16_instructions.py

+ 1 - 1
16_instructions.py

@@ -36,7 +36,7 @@ for effect in effects.split('\n\n'):
     reg = tuple(map(int, before[9:-1].split(', ')))
     opcode, a, b, out = map(int, inst.split())
     expect = tuple(map(int, after[9:-1].split(', ')))
-    mnems = set(mnem for mnem, exe in isa.items() if run(exe, a, b, reg) == expect)
+    mnems = set(m for m, exe in isa.items() if run(exe, a, b, reg) == expect)
     opcodes[opcode] &= mnems
     three += int(len(mnems) >= 3)