2015/4
This commit is contained in:
13
src/2015/4/1/index.ts
Normal file
13
src/2015/4/1/index.ts
Normal 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
13
src/2015/4/2/index.ts
Normal 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++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user