Skip to content

1. Plus-good

In this problem, you’re asked to enter some APL code, including an APL symbol and the data (text or numbers) given to it. Your code will be tested by the APL Challenge system to check whether it gives the correct answer and uses the methods described below.

A list of numbers can be written as numbers separated by one or more spaces. For example, 3 1 4 1 5.

APL uses the symbol + (Plus) for addition, like traditional mathematics. For example, 5 + 2 gives 7.

Plus can work on more than one number at once. For example, 5 + 2 7 1 8 gives 7 12 6 13 because:

  1. 5 + 2 is 7
  2. 5 + 7 is 12
  3. 5 + 1 is 6
  4. 5 + 8 is 13

All other basic mathematical symbols of APL work the same way.


Write some APL code that uses the numbers 31 41 59 26, a single +, and a single number 100, to give the result 131 141 159 126.