From 8ad018d09ee90b51862f25c97bc24ed98567de22 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 14 Dec 2020 08:07:00 +0100 Subject: [PATCH] Bug fix --- 2020/14.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/2020/14.py b/2020/14.py index 5bc24f7..9476504 100755 --- a/2020/14.py +++ b/2020/14.py @@ -101,7 +101,6 @@ for i in range( len(data) ): dec_val, dec_oldval = bintodec(val), bintodec(oldval) mem[address] = dec_val - membin[address] = val # apply mask to address address = dectobin(int(address)) @@ -119,7 +118,7 @@ memsum, memsum2 = 0, 0 for addr, val in mem.items(): memsum += val -for addr, val in mem.items(): +for addr, val in mem2.items(): memsum2 += val print("Part1:", memsum)