Skip to main content
added 55 characters in body; deleted 10 characters in body
Source Link
Business Cat
  • 9.2k
  • 1
  • 17
  • 37

CJam, 14 1212 11 bytes

Saved 2 bytes thanks to Sp3000 and 1 byte thanks to Martin Ender

et0=121,f-S*p

Try it online!Try it online!

Explanation

et0=         e# Push the current year
    121,     e# Push the range 0, 1, ..., 120
        f-   e# For each item in the range, subtract it from the current year
          S*p  e# JoinPrint withthe spacesarray

CJam, 14 12 bytes

Saved 2 bytes thanks to Sp3000

et0=121,f-S*

Try it online!

Explanation

et0=         e# Push the current year
    121,     e# Push the range 0, 1, ..., 120
        f-   e# For each item in the range, subtract it from the current year
          S* e# Join with spaces

CJam, 14 12 11 bytes

Saved 2 bytes thanks to Sp3000 and 1 byte thanks to Martin Ender

et0=121,f-p

Try it online!

Explanation

et0=         e# Push the current year
    121,     e# Push the range 0, 1, ..., 120
        f-   e# For each item in the range, subtract it from current year
          p  e# Print the array
deleted 264 characters in body; added 8 characters in body
Source Link
Business Cat
  • 9.2k
  • 1
  • 17
  • 37

CJam, 1414 12 bytes

Saved 2 bytes thanks to Sp3000

121{et0=\et0=121,f-}%S*S*

Try it online!Try it online!

Explanation

121{           e# Create the range 0, 1, ..., 120, mapped by some block
  et0=  et0=       e# GetPush the current year
        \ 121,     e# SwapPush the top tworange elements0, on1, the..., stack120
         f-     e# Subtract n from current year
     For each item in the }%range, subtract it e#from (endthe ofcurrent block)year
            S* e# Join with spaces

CJam, 14 bytes

121{et0=\-}%S*

Try it online!

Explanation

121{           e# Create the range 0, 1, ..., 120, mapped by some block
    et0=       e# Get the current year
        \      e# Swap the top two elements on the stack
         -     e# Subtract n from current year
          }%   e# (end of block)
            S* e# Join with spaces

CJam, 14 12 bytes

Saved 2 bytes thanks to Sp3000

et0=121,f-S*

Try it online!

Explanation

et0=         e# Push the current year
    121,     e# Push the range 0, 1, ..., 120
        f-   e# For each item in the range, subtract it from the current year
          S* e# Join with spaces
Source Link
Business Cat
  • 9.2k
  • 1
  • 17
  • 37

CJam, 14 bytes

121{et0=\-}%S*

Try it online!

Explanation

121{           e# Create the range 0, 1, ..., 120, mapped by some block
    et0=       e# Get the current year
        \      e# Swap the top two elements on the stack
         -     e# Subtract n from current year
          }%   e# (end of block)
            S* e# Join with spaces