source code for "files/pe/pe_040.pl"
return to portfolio
- #!/usr/bin/perl
- use strict;
- use warnings;
- # this is a stupid brutish solution.
- # the math of this problem isn't interesting
- my $k = 1;
- my $str = '';
- $str .= $k++ while length $str < 10**6;
- $k = 1;
- $k *= substr($str, 10**$_-1, 1) for (0..6);
- print $k;