From 937635d77300c1c86d46dae524675f683ff6a58a Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 13 Dec 2024 16:38:08 +0800 Subject: [PATCH] Clean up --- 2024/day-13/solution-2.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/2024/day-13/solution-2.sh b/2024/day-13/solution-2.sh index efe5584..7525fdb 100644 --- a/2024/day-13/solution-2.sh +++ b/2024/day-13/solution-2.sh @@ -33,7 +33,7 @@ do continue fi - # Numbers have to position integers + # Numbers have to be positive ints if [[ $I -lt 1 ]] || [[ $J -lt 1 ]] then continue @@ -43,8 +43,6 @@ do echo "( $B*$Y - $D*$X ) / ( $B*$C - $D*$A )" >&2 # Button A echo "( $X - $A*$I ) / $B )" >&2 # Button B printf "Answer: I= %s, J= %s\n" "$I" "$J" - #echo "Modulus I: $(( ( B*Y - D*X ) % ( B*C - D*A ) ))" # Button A - #echo "Modulus J: $(( ( X - A*I ) % B ))" # Button B printf "Verify answer : %s to %s, %s to %s\n" "$(( A*I + B*J ))" "$X" "$(( C*I + D*J ))" "$Y" printf "Total cost: %s\n" "$(( I*3 + J*1 ))" } >&2