Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
15
Task/24-game/Frink/24-game.frink
Normal file
15
Task/24-game/Frink/24-game.frink
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ops = ["+", "-", "*", "/"]
|
||||
|
||||
chosen = new array[[4], {|x| random[1,9]}]
|
||||
println[chosen]
|
||||
|
||||
for d = chosen.lexicographicPermute[]
|
||||
multifor o = [ops, ops, ops]
|
||||
{
|
||||
str = "((" + d@0 + o@0 + d@1 + ")" + o@1 + d@2 + ")" + o@2 + d@3
|
||||
if eval[str] == 24
|
||||
println[str]
|
||||
str = "(" + d@0 + o@0 + d@1 + ")" + o@1 + "(" + d@2 + + o@2 + d@3 + ")"
|
||||
if eval[str] == 24
|
||||
println[str]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue