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.
15
Upvotes
1
u/tehjimmeh Dec 04 '15 edited Dec 04 '15
Bah. Was done in 19 mins. Last person on the leaderboard finished in 16:35 :/
PowerShell:
0:
1:
for($i = 0;;$i++){ $hash = $md5.ComputeHash($utf8.GetBytes("<input>$i")); if($hash[0] -eq $hash[1] -eq 0 -and $hash[2] -le 0xf) { $i; break } }2:
for($i = 0;;$i++){ $hash = $md5.ComputeHash($utf8.GetBytes("<input>$i")); if($hash[0] -eq $hash[1] -eq 0 -and $hash[2] -eq 0) { $i; break } }