Przeglądaj źródła

Change variable name

Taddeus Kroes 6 lat temu
rodzic
commit
dc4e0efb06
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      2019/14_reactions.py

+ 3 - 3
2019/14_reactions.py

@@ -25,12 +25,12 @@ def ore_needed(reactions, fuel):
         for inp, ninp in inputs.items():
             produce(inp, ninp * multiplier)
         stash[outp] += noutp * multiplier - amount
-        produced[outp] += amount
+        needed[outp] += amount
 
     stash = defaultdict(int)
-    produced = defaultdict(int)
+    needed = defaultdict(int)
     produce('FUEL', fuel)
-    return produced['ORE']
+    return needed['ORE']
 
 def fuel_with_ore(reactions, ore):
     fuel = 0