diff --git a/2015/01.py b/2015/01.py index 617c37d..8828dd9 100644 --- a/2015/01.py +++ b/2015/01.py @@ -12,8 +12,8 @@ except Exception as e: res1, res2 = 0, 0 -for i in range(len(input)): - match input[i]: +for c in input: + match c case '(': res1 += 1 case ')': diff --git a/2015/17.py b/2015/17.py index fda8961..68b0ceb 100644 --- a/2015/17.py +++ b/2015/17.py @@ -7,36 +7,41 @@ except Exception as e: print(f"An error occurred: {e}") # Reverse sort input + +""" +Let: + f: i -> X[j] for j in range(len(X)) if i & 1< [input[j] for j in range(len(X)) if i & 1<