From 8fadb4204078208d1efe382d8666a893ef629183 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Mon, 4 Dec 2023 08:17:01 +0000 Subject: [PATCH] Update Day Four because I forgot how exponents work --- src/day_four.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/day_four.ts b/src/day_four.ts index f819e03..7a909fa 100644 --- a/src/day_four.ts +++ b/src/day_four.ts @@ -28,7 +28,7 @@ export class Scratchcard { if (!matches.length) return 0; if (matches.length === 1) return 1; - return Math.pow(2, Math.max(matches.length - 1, 1)); + return Math.pow(2, matches.length - 1); } get isWinner() {