Output the largest number with the fewest digits Given a nonempty list of positive decimal integers, output the largest number from the set of numbers with the fewest digits.

The input list will not be in any particular order and may contain repeated values.

Examples:

[1] -&gt; 1
[9] -&gt; 9
[1729] -&gt; 1729
[1, 1] -&gt; 1
[34, 3] -&gt; 3
[38, 39] -&gt; 39
[409, 12, 13] -&gt; 13
[11, 11, 11, 1] -&gt; 1
[11, 11, 11, 11] -&gt; 11
[78, 99, 620, 1] -&gt; 1
[78, 99, 620, 10] -&gt; 99
[78, 99, 620, 100] -&gt; 99
[1, 5, 9, 12, 63, 102] -&gt; 9
[3451, 29820, 2983, 1223, 1337] -&gt; 3451
[738, 2383, 281, 938, 212, 1010] -&gt; 938


The shortest code in bytes wins.
Pyth, 7 3 6 bytes

eS.ml`


Test Suite

Explanation:

e      Still grab the last element
 S      Still sort
  .ml`   But prefilter the list for those with the (m)inimum length.




7 byte solution:

eSh.gl`


Test Suite

Explanation:

   .g   Group items in (implicit) input by:
     l  The length of
      ` their representation
  h     Get those with the shortest length
 S      Sort the resulting list
e       and grab the last (i.e. largest) element