Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
fuglede committed Dec 1, 2023
2 parents 421a997 + e3c85da commit b927b57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions 2015/day11/solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def has_three_straight(s):
return False


def has_no_iou(s):
return 'i' not in s and 'o' not in s and 'u' not in s
def has_no_iol(s):
return 'i' not in s and 'o' not in s and 'l' not in s


def has_double_pair(s):
Expand All @@ -42,7 +42,7 @@ def has_double_pair(s):
def solve(s):
while True:
increase(s, len(s)-1)
if has_three_straight(s) and has_no_iou(s) and has_double_pair(s):
if has_three_straight(s) and has_no_iol(s) and has_double_pair(s):
return ''.join(s)


Expand Down
4 changes: 2 additions & 2 deletions 2023/day01/solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

def calibration(data):
ls = data.split("\n")
ns = [list(map(int, re.findall("\d", x))) for x in ls]
return sum(10 * n[0] + n[-1] for n in ns)
ns = [re.findall("\d", x) for x in ls]
return sum(int(n[0] + n[-1]) for n in ns)


# Part 1
Expand Down

0 comments on commit b927b57

Please sign in to comment.