diff --git a/d10/run.py b/d10/run.py new file mode 100644 index 0000000..188dcc5 --- /dev/null +++ b/d10/run.py @@ -0,0 +1,7 @@ +import sys +from itertools import groupby as gb + +r = sys.argv[1] +for _ in range(int(sys.argv[2])): + r = "".join(f'{n}{c}' for c,n in map(lambda x: (x[0],len(list(x[1]))), gb(r))) +print(len(r)) \ No newline at end of file