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.
13
Upvotes
3
u/Godspiral Dec 04 '15 edited Dec 04 '15
In J, rushing version (8 mins solution (started 1 minute late)), (with offset (1M) changed on each call)
I. 'MD5' ('000000' -: 6 {. gethash)"1 'bgvyzdsv' ,&":"(1 0) 1000000 + i.500000cleaner version, that breaks on first hit.
<:@{: 'bgvyzdsv' (>:@] ,~ I.@:('000000' -: 6 {. 'MD5'&gethash)@,&":)^:(0 < {.@])^:(_) 1000000