Skip to content

Instantly share code, notes, and snippets.

@kevinkace
Last active December 7, 2015 04:35
Show Gist options
  • Save kevinkace/2bcaa40fe0db76d75a04 to your computer and use it in GitHub Desktop.
Save kevinkace/2bcaa40fe0db76d75a04 to your computer and use it in GitHub Desktop.
Advent of Code - 4b
// include this: https://blueimp.github.io/JavaScript-MD5/js/md5.js
var input = "yzbqklnj",
found = false,
suffix = 1;
while(found === false) {
// noprotect
if(window.md5(input + suffix++).indexOf("000000") === 0) {
found = --suffix;
}
}
console.log("found: "+ found);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment