Handbook
Glossary
period ( n -- period )
Vocabulary
project-euler
.
064
.
private
Inputs
n
an
object
Outputs
period
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
project-euler.064.private
::
period
( n -- period )
n
sqrt
>integer
sq
n
=
[
0
]
[
n
pure
split
nip
:>
start 1 start
next
[
dup
start
=
not
]
[
next
[
1
+
]
dip
]
while
drop
]
if
;