From 75d5cb89433fc5fc08133c17509d2fe4530d4314 Mon Sep 17 00:00:00 2001 From: Simon Cambier Date: Thu, 7 Dec 2023 08:43:41 +0100 Subject: [PATCH] Cleaning --- day5-ts/day5.ts | 1 + day6/day6-ts.ts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/day5-ts/day5.ts b/day5-ts/day5.ts index 0b1a99a..b50830f 100644 --- a/day5-ts/day5.ts +++ b/day5-ts/day5.ts @@ -257,6 +257,7 @@ for (const pair of seedsPairs) { const loc = getMapResult(hum, humidityToLocation); if (loc < minimalLocation) minimalLocation = loc; } + console.log("minimalLocation: ", minimalLocation); } console.log(minimalLocation); diff --git a/day6/day6-ts.ts b/day6/day6-ts.ts index f768cf9..6590244 100644 --- a/day6/day6-ts.ts +++ b/day6/day6-ts.ts @@ -4,6 +4,8 @@ type Race = { }; const races: Race[] = []; +const timeFrom = new Date().getTime(); + // const input = `Time: 47 70 75 66 // Distance: 282 1079 1147 1062`.split("\n"); @@ -52,7 +54,5 @@ for (const count of counts) { } console.log(mul); -// console.log(getSpeed(races[0], 2)); -// console.log(getSpeed(races[0], 3)); -// console.log(getSpeed(races[0], 4)); -// console.log(getSpeed(races[0], 5)); +const timeTotal = new Date().getTime() - timeFrom; +console.log(`Time took: ${timeTotal}ms`);