2025-09-13 19:29:06 +10:00
|
|
|
set &number 4
|
|
|
|
set &stop 0
|
|
|
|
|
|
|
|
fun -double !mod -double &in -double &modulus
|
|
|
|
lesser $in $modulus &store
|
|
|
|
not $store &store
|
|
|
|
if $store %downloop
|
|
|
|
|
|
|
|
lesser $in 0 &store
|
|
|
|
if $store %uploop
|
|
|
|
|
|
|
|
jump %end
|
|
|
|
|
|
|
|
@downloop
|
|
|
|
subtract $in $modulus &in
|
|
|
|
lesser $in $modulus &store
|
|
|
|
not $store &store
|
|
|
|
if $store %downloop
|
|
|
|
jump %end
|
|
|
|
|
|
|
|
@uploop
|
|
|
|
add $in $modulus &in
|
|
|
|
lesser $in 0 &store
|
|
|
|
if $store %uploop
|
|
|
|
jump %end
|
|
|
|
|
|
|
|
@end
|
|
|
|
return $in
|
|
|
|
endfun
|
|
|
|
|
|
|
|
@loop
|
|
|
|
equal $number 1 &stop
|
|
|
|
if $stop %end
|
|
|
|
|
|
|
|
|
|
|
|
jump %loop
|
|
|
|
|
|
|
|
@end
|
2025-09-13 07:08:11 +10:00
|
|
|
end 0
|