September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
3
Task/Digital-root/Zkl/digital-root-1.zkl
Normal file
3
Task/Digital-root/Zkl/digital-root-1.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fcn sum(n,b){ n.split(b).sum(0) }
|
||||
fcn droot(n,b=10,X=0) // -->(digital root, additive persistence)
|
||||
{ if(n<b)return(n,X); return(self.fcn(sum(n,b),b,X+1)) }
|
||||
6
Task/Digital-root/Zkl/digital-root-2.zkl
Normal file
6
Task/Digital-root/Zkl/digital-root-2.zkl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
droot(627615)
|
||||
droot(39390)
|
||||
droot(588225)
|
||||
droot(393900588225)
|
||||
droot(7,2)
|
||||
droot(0x7e0,16)
|
||||
Loading…
Add table
Add a link
Reference in a new issue