Compare commits

..

3 commits

Author SHA1 Message Date
Bruno BELANYI 08aab425a2 2024: d02: ex2: add solution 2024-12-02 10:36:22 +00:00
Bruno BELANYI 66c9d92749 2024: d02: ex2: add input 2024-12-02 10:36:22 +00:00
Bruno BELANYI 6634348afe 2024: d02: ex1: add solution 2024-12-02 10:36:22 +00:00
2 changed files with 0 additions and 4 deletions

View file

@ -13,8 +13,6 @@ def solve(input: list[str]) -> int:
def is_safe(report: Report) -> bool:
def is_increasing_safe(report: Report):
for a, b in itertools.pairwise(report):
if a >= b:
return False
if not 1 <= (b - a) <= 3:
return False
return True

View file

@ -13,8 +13,6 @@ def solve(input: list[str]) -> int:
def is_safe(report: Report) -> bool:
def is_increasing_safe(report: Report):
for a, b in itertools.pairwise(report):
if a >= b:
return False
if not 1 <= (b - a) <= 3:
return False
return True