You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
advent-of-code/2015/ruby/day_04.rb

10 lines
214 B

require "digest/md5"
key = "ckczppom"
index = 1
# until Digest::MD5.hexdigest("#{key}#{index}").start_with?("00000")
until Digest::MD5.hexdigest("#{key}#{index}").start_with?("000000")
index += 1
end
puts index