Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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