🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.apl
Article #65

A cute little problem

#65
From: Greg Johnson
Date: Wed, 17 Aug 1983 04:37
29 lines
1133 bytes
Here's a cute problem I just saw in a magazine called APL Market News.
For any positive integer N, compute the sum of 1 through N-1.  The
problem is to find a short APL expression to do this.  Believe it or not,
this can be done using three characters, one of which is 'N'!
(That was a hint.)
The solution follows (after some space to give you time to stop this so
you can think about it.)
|
|
|
|
|
|
|
|
|
|
|
|
v

The solution:  2!N
The problem and solution were submitted to the magazine by Kevin
Farrell of Long Beach, Ca.

						Greg Johnson
						U. of Wisconsin - Madison
						...seismo!uwvax!greg
						greg@uwisc
Technical Details
Message-ID: <1026@uwvax.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!harpo!seismo!uwvax!greg

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site uwvax.ARPA
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!harpo!seismo!uwvax!greg
From: greg@uwvax.ARPA (Greg Johnson)
Newsgroups: net.lang.apl
Subject: A cute little problem
Message-ID: <1026@uwvax.ARPA>
Date: Wed, 17-Aug-83 00:37:53 EDT
Article-I.D.: uwvax.1026
Posted: Wed Aug 17 00:37:53 1983
Date-Received: Thu, 11-Aug-83 17:01:26 EDT
Organization: U of Wisconsin CS Dept
Lines: 29