Countdown: Difference between revisions
m
→{{header|J}}: discard duplicate solutions
(J draft) |
m (→{{header|J}}: discard duplicate solutions) |
||
Line 44:
expr=: {{ (Pa A),(;u`''),Pa B['A B'=.y }}
arith=: [:; <@(+Va, -Va, *Va, %Va,(-Va, %Va)@|.)"1
all=: {{ A#~x=".@>A=.~.,arith^:5 ":each y}}
task=: {{
Line 55:
Examples:
<syntaxhighlight lang=J> task''
terms:
target:
#solutions:
for example: (
task''
terms: 1
target:
#solutions:
for example:
task''
terms: 4 7 8 9 10 10
target: 300
#solutions: 495
for example: (10+(9*10))*((4+7)-8)</syntaxhighlight>
=={{header|Phix}}==
|