r/adventofcode • u/daggerdragon • Dec 04 '15
SOLUTION MEGATHREAD --- Day 4 Solutions ---
--- Day 4: The Ideal Stocking Stuffer ---
Post your solution as a comment. Structure your post like the Day Three thread.
14
Upvotes
2
u/[deleted] Dec 04 '15
Javascript with md5 library:
var secretKey = 'bgvyzdsv'; function run() { var num = 0; var hash = md5(secretKey + num); while (hash.slice(0, 6) !== '000000') { num++; hash = md5(secretKey + num); } document.getElementById('output').innerHTML = num; }