summaryrefslogtreecommitdiffstats
path: root/6.py
diff options
context:
space:
mode:
Diffstat (limited to '6.py')
-rw-r--r--6.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/6.py b/6.py
new file mode 100644
index 0000000..5c3a3d0
--- /dev/null
+++ b/6.py
@@ -0,0 +1,8 @@
+with open('6.in') as f:
+ inp = f.read().rstrip()
+def solve(inp, n):
+ for i in range(n, len(inp)):
+ if len(set(inp[i-n:i])) == n:
+ return i
+print(solve(inp, 4))
+print(solve(inp, 14))