diff options
Diffstat (limited to '2021/01')
-rw-r--r-- | 2021/01/puzzles.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/2021/01/puzzles.py b/2021/01/puzzles.py index d9a704b..0236559 100644 --- a/2021/01/puzzles.py +++ b/2021/01/puzzles.py @@ -1,10 +1,12 @@ #!/usr/bin/env python3 + def main() -> None: - with open("input", "r") as f: + with open("input", "r", encoding="utf-8") as f: nums = [int(n) for n in f.readlines()] print(sum(n < m for n, m in zip(nums, nums[DELTA:]))) + if __name__ == "__main__": main() |