Jump to content

Pythagorean triples: Difference between revisions

→‎{{header|Perl 6}}: simplify obtaining the number of pairs in a hash
(→‎{{header|Perl 6}}: add oyako algorithm)
(→‎{{header|Perl 6}}: simplify obtaining the number of pairs in a hash)
Line 426:
}
 
say "There are {+%trips.keys} Pythagorean Triples with a perimeter less than $limit,"
~" of which {[+] %trips.values} are primitive.";
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.