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

12 lines
269 B
Python

#!/usr/bin/env python
import hashlib
secret = "iwrupvqb".encode('utf-8')
counter = 0
hash = hashlib.md5(secret).hexdigest()
while hash.startswith("000000") == False:
counter += 1
hash = hashlib.md5(secret + str(counter).encode('utf-8')).hexdigest()
print(counter)