diff --git a/2022/day6-bench.py b/2022/day6-bench.py new file mode 100644 index 0000000..2aecc36 --- /dev/null +++ b/2022/day6-bench.py @@ -0,0 +1,11 @@ +l=open('input/6','r').read() +def s(n,skip=0): + for i in range(max(skip, n),len(l)): + if len(set(l[i-n:i]))==n: + return i + +for i in range(100000): + four = s(4) + fourteen = s(14, four) +print(four) +print(fourteen)