04_adventcoin.py 254 B

1234567
  1. #!/usr/bin/env python3
  2. from hashlib import md5
  3. from itertools import count
  4. hashes = ((i, md5(b'iwrupvqb%d' % i).hexdigest()) for i in count(0))
  5. print(next(i for i, h in hashes if h[:5] == '00000'))
  6. print(next(i for i, h in hashes if h[:6] == '000000'))