Pythagorean triples: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: add oyako algorithm) |
(→{{header|Perl 6}}: simplify obtaining the number of pairs in a hash) |
||
Line 426: | Line 426: | ||
} |
} |
||
say "There are {+%trips |
say "There are {+%trips} Pythagorean Triples with a perimeter less than $limit," |
||
~" of which {[+] %trips.values} are primitive."; |
~" of which {[+] %trips.values} are primitive."; |
||