Puzzle du 4 décembre 2015
This commit is contained in:
parent
01ea1de789
commit
8807ce7880
|
@ -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))
|
Loading…
Reference in New Issue