Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
Module MultipleLoop {
|
||||
def long prod=1, sum=0, x=+5,y=-5, z=-2, one=1, three=3, seven=7, j
|
||||
Range=lambda (a, b, c=1) ->{
|
||||
=lambda a, b, c (&f)-> {
|
||||
if compare(a,b)=sgn(c) then =false else =true: f=a: a+=c
|
||||
}
|
||||
}
|
||||
MultipleRange=Lambda -> {
|
||||
a=array([]) ' convert stack items in current stack [] to an array of items
|
||||
=lambda a, k=0 (&f) ->{
|
||||
do : if k<len(a) Else exit
|
||||
if a#eval(k, &f) then =true: exit
|
||||
k++ : always
|
||||
}
|
||||
}
|
||||
Exec=MultipleRange(Range(-three, 3**3, three), Range(-seven, +seven, x), Range(555, 550-y), Range(22, -28, -three), Range(1927, 1939), Range(x,y,z), Range(11**x, 11**x+one))
|
||||
j=0
|
||||
while Exec(&j)
|
||||
sum+=abs(j)
|
||||
if abs(prod) < 2^27 And j <> 0 then prod*=j
|
||||
End While
|
||||
|
||||
Print "sum=";sum
|
||||
Print "prod=";prod
|
||||
}
|
||||
MultipleLoop
|
||||
Loading…
Add table
Add a link
Reference in a new issue