diff options
| author | nekineki <nekineki@nekineki.net> | 2022-12-11 14:47:27 +0100 |
|---|---|---|
| committer | nekineki <nekineki@nekineki.net> | 2022-12-11 14:50:32 +0100 |
| commit | fe75c10e350743a1c078f065d69556fecf825ca5 (patch) | |
| tree | 956556a564c9329346dc9d8b1535dc5e365f3d55 /2022/day6/asd.py | |
| parent | a74d2dc54aef546664bcc8c81eb8e01a93e94391 (diff) | |
move files around, update paths
Diffstat (limited to '2022/day6/asd.py')
| -rwxr-xr-x | 2022/day6/asd.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/2022/day6/asd.py b/2022/day6/asd.py deleted file mode 100755 index c998af3..0000000 --- a/2022/day6/asd.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python3 - -# import numpy as np -from functools import reduce -from re import findall -from copy import deepcopy - - -# filename = "ref.txt" -filename = "pzl.txt" - -res1 = 0 -res2 = 0 - -def solve(n): - f = open(filename) - for line in f: - line = line.strip() - for a in range(len(line)-n): - s = set() - for i in range(0,n): - s.add(line[a+i]) - - if len(s) == n: - # print(s) - res = a + n - return res - f.close() - -res1 = solve(4) -res2 = solve(14) - -print('res1:', res1) -print('res2:', res2) - |
