From e1a4d88b80ba389b1ea0c4bb6c83e740a9ad5723 Mon Sep 17 00:00:00 2001 From: Sijmen Date: Tue, 6 Dec 2022 10:52:05 +0100 Subject: [PATCH] 6 --- day06.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 day06.py diff --git a/day06.py b/day06.py new file mode 100644 index 0000000..3f873d0 --- /dev/null +++ b/day06.py @@ -0,0 +1,3 @@ +inp = input().strip() +print(next(i + 4 for i in range(len(inp)) if len(set(inp[i : i + 4])) == 4)) +print(next(i + 14 for i in range(len(inp)) if len(set(inp[i : i + 14])) == 14))