Files
aoc/2015/04.py
2025-10-29 23:23:02 -06:00

14 lines
230 B
Python

import hashlib
zeros= 5
input = "abcdef"
for i in range(10**(zeros+1)):
string = input + str(i).zfill(zeros)
hash = hashlib.md5(string.encode('utf-8')).hexdigest()
if hash.startswith(zeros*"0"):
print(i, hash)
break;