diff --git a/2025/01/part1.py b/2025/01/part1.py new file mode 100644 index 0000000..110d748 --- /dev/null +++ b/2025/01/part1.py @@ -0,0 +1,20 @@ +# TODO: Get the inout. + +counter = 50 +code = 0 +for move in moves: + direction, number = move[0], int(move[1:]) + + assert direction in ['L', 'R'], f"Direction should be left (L) or right (R), not '{direction}'" + assert number > 0, f"Number should be positive, not '{number}'" + + if direction == 'L': + counter -= number + else: + counter += number + + # If we get zero, let's store that. + if counter % 100 == 0: + code += 1 + +print("The actual password is:", code)