aoc/2015/04/part1.py

15 lines
205 B
Python
Raw Normal View History

2018-11-30 14:39:18 +00:00
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