My Advent of Code solutions in Python. kevinyap.ca/2019/12/going-fast-in-advent-of-code/
advent-of-code python
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update day18.py

+1 -1
+1 -1
2016/day18.py
··· 17 17 if __name__ == '__main__': 18 18 # Represent traps as True and safe tiles as False. 19 19 # The number of safe tiles per row is len(row) - sum(row). 20 - row = [True if c == '^' else False for c in fileinput.input()[0].strip()] 20 + row = [c == '^' for c in fileinput.input()[0].strip()] 21 21 row_len = len(row) 22 22 safe_tiles = row_len - sum(row) 23 23