aoc
/
2022
1
0
Fork 0
2022/day06.py

9 lines
243 B
Python
Raw Permalink Normal View History

2022-12-24 14:59:27 +00:00
def main():
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))
if __name__ == "__main__":
main()