diff --git a/day07/sol.py b/day07/sol.py index e7e4253..e16698d 100644 --- a/day07/sol.py +++ b/day07/sol.py @@ -33,10 +33,6 @@ for cmd in cmds: print(sizes) -t = 0 -for sz in sizes.values(): - if sz <= 100000: - t += sz -print(t) +print(sum(sz for sz in sizes.values() if sz <= 100000)) print(min(sz for sz in sizes.values() if 70000000 - sizes[''] + sz >= 30000000))