mirror of
https://github.com/ershisan99/advent-of-code.git
synced 2025-12-16 12:32:49 +00:00
2015 day 6 refactored a bit
This commit is contained in:
@@ -24,7 +24,4 @@ for line in lines:
|
||||
lights[(i, j)] = False
|
||||
else:
|
||||
lights[(i, j)] = not lights[(i, j)]
|
||||
count = 0
|
||||
for v in lights.values():
|
||||
count += v
|
||||
print(count)
|
||||
print(sum(lights.values()))
|
||||
|
||||
@@ -27,7 +27,5 @@ for line in lines:
|
||||
lights[(i, j)] -= 1
|
||||
else:
|
||||
lights[(i, j)] += 2
|
||||
count = 0
|
||||
for v in lights.values():
|
||||
count += v
|
||||
print(count)
|
||||
|
||||
print(sum(lights.values()))
|
||||
|
||||
Reference in New Issue
Block a user