Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Tau-function/Raku/tau-function.raku
Normal file
18
Task/Tau-function/Raku/tau-function.raku
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use Prime::Factor:ver<0.3.0+>;
|
||||
use Lingua::EN::Numbers;
|
||||
|
||||
say "\nTau function - first 100:\n", # ID
|
||||
(1..*).map({ +.&divisors })[^100]\ # the task
|
||||
.batch(20)».fmt("%3d").join("\n"); # display formatting
|
||||
|
||||
say "\nTau numbers - first 100:\n", # ID
|
||||
(1..*).grep({ $_ %% +.&divisors })[^100]\ # the task
|
||||
.batch(10)».&comma».fmt("%5s").join("\n"); # display formatting
|
||||
|
||||
say "\nDivisor sums - first 100:\n", # ID
|
||||
(1..*).map({ [+] .&divisors })[^100]\ # the task
|
||||
.batch(20)».fmt("%4d").join("\n"); # display formatting
|
||||
|
||||
say "\nDivisor products - first 100:\n", # ID
|
||||
(1..*).map({ [×] .&divisors })[^100]\ # the task
|
||||
.batch(5)».&comma».fmt("%16s").join("\n"); # display formatting
|
||||
Loading…
Add table
Add a link
Reference in a new issue