Skip to content

Instantly share code, notes, and snippets.

@xtetsuji xtetsuji/
Created Jan 11, 2017

What would you like to do?
When sum of all multiplation table numbers is subtracted 9, its answer is 2016.
use strict;
use warnings;
my $sum = 0;
for my $i (1..9) {
for my $j (1..9) {
$sum += $i * $j;
$sum -= 9;
print "sum = $sum\n";
$ perl
sum = 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.