Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Fractran/11l/fractran.11l
Normal file
12
Task/Fractran/11l/fractran.11l
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
F fractran(prog, =val, limit)
|
||||
V fracts = prog.split(‘ ’).map(p -> p.split(‘/’).map(i -> Int(i)))
|
||||
[Float] r
|
||||
L(n) 0 .< limit
|
||||
r [+]= val
|
||||
L(p) fracts
|
||||
I val % p[1] == 0
|
||||
val = p[0] * val / p[1]
|
||||
L.break
|
||||
R r
|
||||
|
||||
print(fractran(‘17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1’, 2, 15))
|
||||
Loading…
Add table
Add a link
Reference in a new issue