adventofcode/2015/04/coins.pl

14 lines
126 B
Perl
Raw Normal View History

2017-12-04 01:40:18 +00:00
use 5.20.0;
my $s = shift;
use Digest::MD5 qw/ md5_hex /;
my $i = 0;
$i++ until md5_hex( $s . $i ) =~ /^0{5}/;
say $i;