2024-12-05 03:18:24 +00:00
|
|
|
import fs from "node:fs";
|
|
|
|
import { printTime, now } from "../util";
|
|
|
|
|
2024-12-05 03:38:21 +00:00
|
|
|
const test = false;
|
|
|
|
|
|
|
|
const data = fs.readFileSync(
|
|
|
|
test ? "./inputs/testinput" : "./inputs/input",
|
|
|
|
"utf8"
|
|
|
|
);
|
2024-12-05 03:18:24 +00:00
|
|
|
|
|
|
|
let timer = now.instant();
|
|
|
|
console.log(
|
|
|
|
"part one:",
|
|
|
|
data.split("\n").slice(0, -1),
|
|
|
|
printTime(now.instant().since(timer))
|
|
|
|
);
|
|
|
|
|
|
|
|
timer = now.instant();
|
|
|
|
console.log(
|
|
|
|
"part two:",
|
|
|
|
data.split("\n").slice(0, -1),
|
|
|
|
printTime(now.instant().since(timer))
|
|
|
|
);
|