rename n.py -> 0n.py
This commit is contained in:
13
2015/04.py
Normal file
13
2015/04.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import hashlib
|
||||
|
||||
zeros= 5
|
||||
input = "abcdef"
|
||||
|
||||
for i in range(10**(zeros+1)):
|
||||
string = input + str(i).zfill(zeros)
|
||||
hash = hashlib.md5(string.encode('utf-8')).hexdigest()
|
||||
|
||||
if hash.startswith(zeros*"0"):
|
||||
print(i, hash)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user