diff options
Diffstat (limited to '2020/13')
-rwxr-xr-x | 2020/13/puzzle-1.py | 2 | ||||
-rwxr-xr-x | 2020/13/puzzle-2.py | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/2020/13/puzzle-1.py b/2020/13/puzzle-1.py index 7b21f96..ef83817 100755 --- a/2020/13/puzzle-1.py +++ b/2020/13/puzzle-1.py @@ -2,7 +2,7 @@ def main() -> None: - with open("input", "r") as f: + with open("input", "r", encoding="utf-8") as f: time = int(f.readline()) ids = list(map(int, f.readline().replace(",x", "").split(","))) diff --git a/2020/13/puzzle-2.py b/2020/13/puzzle-2.py index 3965488..cf16c22 100755 --- a/2020/13/puzzle-2.py +++ b/2020/13/puzzle-2.py @@ -32,7 +32,6 @@ def main() -> None: buses = tuple(filter(lambda x: x != "x", ids)) modres = tuple(x if (x := bus - ids.index(bus)) != bus else 0 for bus in buses) - print(chinese_remainder(buses, modres)) |