This commit is contained in:
2025-11-11 04:51:48 +01:00
parent 52def01d74
commit 972b0dbe17
2 changed files with 26 additions and 0 deletions

13
src/2015/4/1/index.ts Normal file
View File

@@ -0,0 +1,13 @@
export default async function runner(inputPath: string){
const input = (await Bun.file(inputPath).text()).trimEnd();
let i = 1;
while (true){
const hash = Bun.MD5.hash(`${input}${i}`, "hex")
if(hash.startsWith("00000")) {
console.log(i);
return;
}
i++;
}
}

13
src/2015/4/2/index.ts Normal file
View File

@@ -0,0 +1,13 @@
export default async function runner(inputPath: string){
const input = (await Bun.file(inputPath).text()).trimEnd();
let i = 1;
while (true){
const hash = Bun.MD5.hash(`${input}${i}`, "hex")
if(hash.startsWith("000000")) {
console.log(i);
return;
}
i++;
}
}