Created
July 28, 2017 19:02
-
-
Save muraiki/fb7da4eb0f07e54ad07776effc7ad992 to your computer and use it in GitHub Desktop.
Generate series of 28 numbers in ascending order that total close to 1500 (APL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⍝ https://ngn.github.io/apl/web/index.html#code=s%u21902%D71+%u237314%0Ax%u2190%28s%2C-s%29+%284%D7%u237328%29%0A%u2395%20%u2190x%5B%u234Bx%5D%0A%u2395%20%u2190+/x | |
s←2×1+⍳14 | |
x←(s,-s)+(4×⍳28) | |
⎕ ←x[⍋x] | |
⎕ ←+/x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment