Skip to content

Instantly share code, notes, and snippets.

@SpringMT
Created September 28, 2011 11:44
Show Gist options
  • Select an option

  • Save SpringMT/1247745 to your computer and use it in GitHub Desktop.

Select an option

Save SpringMT/1247745 to your computer and use it in GitHub Desktop.
乱数調査 途中
perl -le 'my %a; my $i = 1; for ($i=1; $i < 100000; $i++) { $a{ int(rand(1000000)) }++ ; }; for my $key ( keys %a ) { if ($a{$key} > 3) {print $key} } '
perl -le 'my %a; my $i = 1; for ($i=1; $i < 1000000; $i++) { $a{ int(rand(1000000)+1) }++ ; }; for my $key ( keys %a ) { if ( ($key % 1000000) == 0) {print "$key" . "\t" . $a{$key} } } '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment