6 lines
139 B
Text
6 lines
139 B
Text
|
|
to int_power :n :m
|
||
|
|
if equal? 0 :m [output 1]
|
||
|
|
if equal? 0 modulo :m 2 [output int_power :n*:n :m/2]
|
||
|
|
output :n * int_power :n :m-1
|
||
|
|
end
|