NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Friday January 28, 2005
01:06 PM
Triangles Challenge
I didn't see a Perl solution in the Triangles Challenge. Everyone there seems to love Lisp.
Can anyone defend Perl's honor?
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Done!! :-) (Score:1)
Unfortunately, I now realized the contest is over, so I don't think I can submit my Perl solution...
Re:Done!! :-) (Score:1)
use warnings;
use strict;
use Math::Combinatorics;
my %points = (
0 => [ 0
1 => [ 0
2 => [ 4, 6, 1, 3, 5, 0 ],
3 => [ 5, 2, 1, 7, 9, 0 ],
4 => [ 6, 2, 0, 7, 8, 1 ],
5 => [ 0, 8, 10, 2, 1 ],
6 => [ 10, 9, 1, 4, 2, 0 ],
7 => [ 8,
Re:Done!! :-) (Score:1)
Good job. It passes the second test shown on the page too.
Re:Done!! :-) (Score:1)