- https://www.codewars.com/kata/5efae11e2d12df00331f91a6 Crack the PIN.
Started at 21:41 20.10.2020 Tuesday Oct.
Finished at 21:48 20.10.2020 Tuesday Oct. (0hrs 7 minutes)
<?php | |
# https://www.codewars.com/kata/5efae11e2d12df00331f91a6 Crack the PIN. | |
//Don't echo anything, will take to much time | |
function crack($hash){ | |
for($i = 0; $i <= 99999; $i += 1){ | |
$x = md5(str_pad($i, 5, "0", STR_PAD_LEFT)); | |
if($x == $hash) return str_pad($i, 5, "0", STR_PAD_LEFT); | |
} | |
throw new Exception('Full iteration and no result.'); | |
} |
Started at 21:41 20.10.2020 Tuesday Oct.
Finished at 21:48 20.10.2020 Tuesday Oct. (0hrs 7 minutes)