2020.10.14 04:51 PM
2020.10.15 12:48 AM
2020.10.15 12:55 AM
2020.10.15 02:26 AM
2020.10.15 03:28 AM
2020.10.15 03:30 AM
2020.10.15 04:46 AM
2020.10.15 12:22 PM
2020.10.15 12:25 PM
2020.10.15 01:34 PM
You are trying to work your vector muscle; maybe an iterator as well?{sum each x where each 1 not\x mod 2}til 9or taking any of the isOdd alternativessum each x where each 1 not\isOdd x1 f\x is the answer to: How many Zen monks does it take to change a light bulb? (Two: one to change it, and one not to change it.)
2020.10.15 01:46 PM
2020.10.15 01:28 PM
2020.10.15 01:24 PM
Not necessarily more optimal, but an introduction to boolean multiplication:q)sum l*l mod 2
25
q)sum l*not l mod 2
20
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.