Smallest multiple: Difference between revisions
Content deleted Content added
m →extended: extended to show count of digits til 2 billion |
|||
Line 451:
19: 232792560 = 16*9*5*7*11*13*17*19
20: 232792560 = 16*9*5*7*11*13*17*19
</pre>
=={{header|Perl}}==
<lang perl>#!/usr/bin/perl
use strict; # https://rosettacode.org/wiki/Smallest_multiple#Raku
use warnings;
use ntheory qw( lcm );
print "for $_, it's @{[ lcm(1 .. $_) ]}\n" for 10, 20;</lang>
{{out}}
<pre>
for 10, it's 2520
for 20, it's 232792560
</pre>
|