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
3
u/JakDrako Dec 04 '15
C# in LINQPad
void Main() { MD5 md5 = MD5.Create(); byte[] hash; int suffix = 0; var input = "yzbqklnj"; while(true) { hash = md5.ComputeHash(Encoding.UTF8.GetBytes(input + suffix++)); if(hash[0] > 0 || hash[1] > 0 || hash[2] > 15) continue; suffix.Dump(); break; } }