aoc/2015/04/part1.py
2018-12-10 23:56:11 +00:00

15 lines
205 B
Python

input = "ckczppom"
import hashlib
num = 6
i = 0
while True:
i += 1
m = hashlib.md5()
m.update(str(input+str(i)).encode())
print(m.hexdigest())
if m.hexdigest()[0:num] == "0"*num:
print(i)
break