Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
How many kind numbers 9*9 multiplation table has.
use strict;
use warnings;
my %seen;
for my $i (1..9) {
for my $j (1..9) {
$seen{$i * $j}++;
my @seen = keys %seen;
print "9*9 tables has " . @seen . " kind numbers\n";
$ perl
9*9 tables has 36 kind numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment