1
0
Fork 0
advent-of-code/2015/aoc_d4p1.py

13 lines
268 B
Python
Raw Permalink Normal View History

2024-02-08 09:55:40 +01:00
#!/usr/bin/env python
import hashlib
secret = "iwrupvqb".encode('utf-8')
counter = 0
hash = hashlib.md5(secret).hexdigest()
while hash.startswith("00000") == False:
counter += 1
hash = hashlib.md5(secret + str(counter).encode('utf-8')).hexdigest()
print(counter)