Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Executable-library/Perl/executable-library-2.pl
Normal file
11
Task/Executable-library/Perl/executable-library-2.pl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use Hailstone;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %seqs;
|
||||
for (1 .. 100_000) {
|
||||
$seqs{Hailstone::len($_)}++;
|
||||
}
|
||||
|
||||
my ($most_frequent) = sort {$seqs{$b} <=> $seqs{$a}} keys %seqs;
|
||||
print "Most frequent length: $most_frequent ($seqs{$most_frequent} occurrences)\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue