<reponame>astonshane/AdventOfCode<filename>2015/python/day4/chal7.py
import md5

secret = "<KEY>"

m = md5.new()

m.update(secret)

i = 1
while(1):
    print i,
    m1 = m.copy()
    m1.update(str(i))
    hsh = m1.hexdigest()
    print hsh
    if hsh[:5] == "00000":
        print i
        break
    i += 1

import md5

secret = "<KEY>"

m = md5.new()

m.update(secret)

i = 1
while(1):
    print i,
    m1 = m.copy()
    m1.update(str(i))
    hsh = m1.hexdigest()
    print hsh
    if hsh[:5] == "00000":
        print i
        break
    i += 1