2017 Code Golf Challenge

A bit of fun (and possibly frustration!) for 2017...our monthly "code golf puzzle". Enjoy!

The Objective

Each month, find the shortest possible APL expression that evaluates to that month's given numerical targets* without using any of the digits 0-9 or the quote glyph ('). For example, numbers 0-2 can be obtained as follows:

   ⍴⍬
0

   ≢#
1

   ⍴⍬⍬
2

*Numerical targets are the week numbers for that month according to https://weeknumber.co.uk/calendar/england/2017.

The aim of code golf is to use as few characters as possible in each expression.


August's goal is four expressions that result in the four numbers 32, 33, 34 and 35.

The Rules

  • Expressions must not contain the digits 0-9 or the quote glyph (').
  • Expressions must not rely on local conditions, for example, the operating system, the exact date/time or specific input from the user.
  • System variables can be used but must be set to the Dyalog default values – this includes ⎕ML and ⎕IO (the defaults for these are both 1)
  • Returned values can be scalar integers, one-element integer arrays or character vectors but must not include decimals (even ".0").
  • Non-redundant spaces are included in the character count.
  • Entries will be rated by the number of characters in the submission.
  • Entries for each month will only be accepted in that month. However, a summary of expressions for all months can be submitted in December for entry in the cumulative total part of the game.

If you have any questions or spot any loopholes/ambiguities, please email codegolf@dyalog.com.

Eligibility

Closing Date

Prizes

Anyone can enter. Monthly & 31 December 2017 Be immortalised in our 2017 Hall of Fame!

Submitting Your Entry

Email your expressions in a text file, Microsoft Excel file or workspace to codegolf@dyalog.com stating the version of Dyalog that you wrote/tested them on (don't forget to include your name).

2017 Hall of Fame

Best scores for monthly submissions:

MonthGoalsNumber of Characters UsedName(s)
January 1, 2, 3, 4, 5    
February 6, 7, 8, 9    
March 10, 11, 12, 13    
April 14, 15, 16, 17    
May 18, 19, 20, 21, 22    
June 23, 24, 25, 26    
July 27, 28, 29, 30, 31    
August 32, 33, 34, 35    
September 36, 37, 38, 39    
October 40, 41, 42, 43, 44    
November 45, 46, 47, 48    
December 49, 50, 51, 52    

 

Cumulative scores for submissions for the entire year (1-52 inclusive):

NameNumber of Characters Used
   
   
   

At the end of 2017, an amalgamation of all the entries will be published showing the expressions that use the fewest characters for each number.

Previous Years

2016