Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
13
Task/Digital-root/Wortel/digital-root.wortel
Normal file
13
Task/Digital-root/Wortel/digital-root.wortel
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@let {
|
||||
sumDigits ^(@sum @arr)
|
||||
drootl &\@rangef [. sumDigits ^(\~>1 #@arr)]
|
||||
|
||||
droot ^(@last drootl)
|
||||
apers ^(#-drootl)
|
||||
|
||||
[
|
||||
!console.log "[number]: [digital root] [additive persistence] [intermediate sums]"
|
||||
~@each [627615 39390 588225 393900588225]
|
||||
&n !console.log "{n}: {!droot n} {!apers n} {@str !drootl n}"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue