aoc/2015/four/solution.py
2025-05-01 12:38:17 +03:00

11 lines
208 B
Python

import hashlib
key = "iwrupvqb"
found = False
i = 0
while not found:
result = hashlib.md5(bytes(key+str(i), 'utf-8')).hexdigest()
i += 1
if result[:5] == "00000":
found = True
print(i-1)