mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-26 13:20:32 +01:00
Change directory structure.
This commit is contained in:
15
day-04/solution.py
Normal file
15
day-04/solution.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
import md5
|
||||
|
||||
word = sys.argv[1]
|
||||
number = 0
|
||||
|
||||
while True:
|
||||
digester = md5.new(word)
|
||||
digester.update(str(number))
|
||||
|
||||
if digester.hexdigest()[0:6] == "000000":
|
||||
print word, number
|
||||
break
|
||||
|
||||
number = number + 1
|
||||
Reference in New Issue
Block a user