fork download
  1. len = "%12s"
  2.  
  3. while line = gets
  4. words = line.split
  5.  
  6. line.match /.*:/
  7. head = $& || words.first
  8. tail = words - (head || "").split
  9.  
  10. print " " * 4
  11. print len % head
  12. puts (len * tail.size) % tail
  13. end
Success #stdin #stdout 0s 28216KB
stdin
Посетители (все /b/ /a/ /vg/ /s/).
Всего: 1002 540 257 152 70
Windows: 731 389 190 122 52
Linux: 88 61 25 5 11
MacOS: 14 9 5 4 0
Android: 163 86 39 21 6
Cirnoid: 1 1 0 0 0
Mobile iOS: 30 14 3 3 0

Пoстеры (все /b/ /a/ /vg/ /s/).
Всего: 164 113 31 22 4
Windows: 124 88 24 19 3
Linux: 18 16 2 1 0
MacOS: 4 2 2 2 0
Android: 17 6 3 0 1
Cirnoid: 0 0 0 0 0
Mobile iOS: 5 4 1 0 0
stdout
      Посетители        (все         /b/         /a/        /vg/       /s/).
          Всего:        1002         540         257         152          70
        Windows:         731         389         190         122          52
          Linux:          88          61          25           5          11
          MacOS:          14           9           5           4           0
        Android:         163          86          39          21           6
        Cirnoid:           1           1           0           0           0
     Mobile iOS:          30          14           3           3           0
                
         Пoстеры        (все         /b/         /a/        /vg/       /s/).
          Всего:         164         113          31          22           4
        Windows:         124          88          24          19           3
          Linux:          18          16           2           1           0
          MacOS:           4           2           2           2           0
        Android:          17           6           3           0           1
        Cirnoid:           0           0           0           0           0
     Mobile iOS:           5           4           1           0           0