first commit

This commit is contained in:
Peter Hudec
2015-12-17 01:55:50 +01:00
commit 6a4482d038
35 changed files with 3965 additions and 0 deletions

23
04/part02.py Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/python
import hashlib
import re
def main():
number = 0
input = "yzbqklnj"
while True:
s = "%s%d" % (input, number)
m = hashlib.md5()
m.update(s)
h = m.hexdigest()
if re.match(r'^(0){6}', h):
print number
print h
break
number = number + 1
if __name__ == "__main__":
main()