1
0
Fork 0

Puzzle du 4 décembre 2015

This commit is contained in:
Lucidiot 2017-12-05 12:13:09 +01:00
parent 01ea1de789
commit 8807ce7880
No known key found for this signature in database
GPG Key ID: C31F0484107D03EC
1 changed files with 13 additions and 0 deletions

13
2015/4/coin.py Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import sys, hashlib
key = sys.stdin.readline().strip()
def findmd5(n):
result = " "
i = 0
while result[:n] != "0" * n:
i = i + 1
result = hashlib.md5((key + str(i)).encode('utf-8')).hexdigest()
return i
print(findmd5(5), findmd5(6))