This website works better with JavaScript.
Home
Explore
Help
Sign In
roderic
/
advent
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
🐶
master
Roderic Day
2 years ago
parent
c2477ec957
commit
da42f369b7
1 changed files
with
6 additions
and
0 deletions
Split View
Show Diff Stats
+6
-0
y2022/p06.py
+ 6
- 0
y2022/p06.py
View File
@@ -0,0 +1,6 @@
text = open(0).read()
for N in [4, 14]:
for i in range(len(text)):
if len(set(text[i:i + N])) == N:
break
print(i + N)
Write
Preview
Loading…
Cancel
Save