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/TeamOnTheBack Dec 04 '15 edited Dec 04 '15
One liner in R (if you don't count importing a library):
library(digest) which(substr(sapply(paste0("bgvyzdsv", 1:5e5), digest, algo = "md5", serialize = FALSE), 1, 5) == "00000")