Skip to main content
deleted 12 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 31 26 bytes

q_)/_S*S%@_]:,:s),f{Se[}S*

Try it online!

How it works

q_                         e# Read all input from STDIN and push two copies.
  )                        e# Pop the last character (linefeed) of the second copy.
   /                       e# Split the remaining string at linefeeds.
    _                      e# Push a copy.
     S*                    e# Join the copy, separating by spaces.
       S%                  e# Split at runs of spaces.
         @_                e# Rotate the original input on top and push a copy.
           ]               e# Wrap all four items in an array.
            :,             e# Get the length of each item.
              :s           e# Cast the lengths (integers) to strings.
                )          e# Pop the last length (byte count).
                 ,         e# Get the number of digits.
                  f{Se[}   e# Left-pad all three length with spaces to that length.
                        S* e# Join, separating by spaces.

CJam, 31 26 bytes

q_)/_S*S%@_]:,:s),f{Se[}S*

Try it online!

CJam, 31 26 bytes

q_)/_S*S%@_]:,:s),f{Se[}S*

Try it online!

How it works

q_                         e# Read all input from STDIN and push two copies.
  )                        e# Pop the last character (linefeed) of the second copy.
   /                       e# Split the remaining string at linefeeds.
    _                      e# Push a copy.
     S*                    e# Join the copy, separating by spaces.
       S%                  e# Split at runs of spaces.
         @_                e# Rotate the original input on top and push a copy.
           ]               e# Wrap all four items in an array.
            :,             e# Get the length of each item.
              :s           e# Cast the lengths (integers) to strings.
                )          e# Pop the last length (byte count).
                 ,         e# Get the number of digits.
                  f{Se[}   e# Left-pad all three length with spaces to that length.
                        S* e# Join, separating by spaces.
Post Undeleted by Dennis
deleted 12 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 3131 26 bytes

q__W<Nq_)/\NSerS%@_]_S*S%@_]:,:s),f{Se[}S*

Try it online!Try it online!

CJam, 31 bytes

q__W<N/\NSerS%@_]:,:s),f{Se[}S*

Try it online!

CJam, 31 26 bytes

q_)/_S*S%@_]:,:s),f{Se[}S*

Try it online!

Post Deleted by Dennis
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 31 bytes

q__W<N/\NSerS%@_]:,:s),f{Se[}S*

Try it online!