Sum and product puzzle: Difference between revisions

Line 1,094:
'''Tacit Solution'''
<syntaxhighlight lang="j">(X=. 0&{"1) (Y=. 1&{"1)
(S=. X + Y) (P=. X * Y)
 
candidates=. ([ echo o (' candidates' ,~ ": (o=. @:) #))
Line 1,099 ⟶ 1,100:
filter0=. candidates o (constraints # ])
 
(S=. X + Y) (P=. X * Y)
(sd=. S </. ]) (pd=. P </. ]) NB. sum and product decompositions
 
23

edits