summaryrefslogtreecommitdiff
path: root/aoc_2023/day-07
diff options
context:
space:
mode:
Diffstat (limited to 'aoc_2023/day-07')
-rw-r--r--aoc_2023/day-07/part_1.ts6
-rw-r--r--aoc_2023/day-07/part_2.ts6
2 files changed, 2 insertions, 10 deletions
diff --git a/aoc_2023/day-07/part_1.ts b/aoc_2023/day-07/part_1.ts
index 3288873..74975a4 100644
--- a/aoc_2023/day-07/part_1.ts
+++ b/aoc_2023/day-07/part_1.ts
@@ -58,12 +58,8 @@ export const main = async (lines: string[]): Promise<number | string> => {
}
return scoreOne - scoreTwo;
});
- console.log(hands);
- return hands.reduce((acc, { hand, bid }, i) => {
- console.log(hand, bid, i + 1);
- return acc + bid * (i + 1);
- }, 0);
+ return hands.reduce((acc, { bid }, i) => acc + bid * (i + 1), 0);
};
//
diff --git a/aoc_2023/day-07/part_2.ts b/aoc_2023/day-07/part_2.ts
index df8a947..1e6ae7d 100644
--- a/aoc_2023/day-07/part_2.ts
+++ b/aoc_2023/day-07/part_2.ts
@@ -71,12 +71,8 @@ export const main = async (lines: string[]): Promise<number | string> => {
}
return scoreOne - scoreTwo;
});
- console.log(hands);
- return hands.reduce((acc, { hand, bid }, i) => {
- console.log(hand, bid, i + 1);
- return acc + bid * (i + 1);
- }, 0);
+ return hands.reduce((acc, { bid }, i) => acc + bid * (i + 1), 0);
};
//