Skip to main content
-1 byte
Source Link
2014MELO03
  • 1.1k
  • 9
  • 7

GolfScript, 1313 12 bytes

{48-}/]10base%10base

Try it online!Try it online!

{   }/ %         # For each byte in the input
 48-            # Subtract 48
      ]         # Put all results in an array
       10base   # Convert to base 10

Alternative 13 byte solution:

0\{48-\10*+}/

Try it online!

0\              # Put 0 under the input
  {        }/   # For each byte in the input
   48-          # Subtract 48
      \10*      # Multiply the output by 10
          +     # Add the subtracted ASCII

GolfScript, 13 bytes

{48-}/]10base

Try it online!

{   }/          # For each byte in the input
 48-            # Subtract 48
      ]         # Put all results in an array
       10base   # Convert to base 10

Alternative 13 byte solution:

0\{48-\10*+}/

Try it online!

0\              # Put 0 under the input
  {        }/   # For each byte in the input
   48-          # Subtract 48
      \10*      # Multiply the output by 10
          +     # Add the subtracted ASCII

GolfScript, 13 12 bytes

{48-}%10base

Try it online!

{   }%         # For each byte in the input
 48-           # Subtract 48
      10base   # Convert to base 10
Source Link
2014MELO03
  • 1.1k
  • 9
  • 7

GolfScript, 13 bytes

{48-}/]10base

Try it online!

{   }/          # For each byte in the input
 48-            # Subtract 48
      ]         # Put all results in an array
       10base   # Convert to base 10

Alternative 13 byte solution:

0\{48-\10*+}/

Try it online!

0\              # Put 0 under the input
  {        }/   # For each byte in the input
   48-          # Subtract 48
      \10*      # Multiply the output by 10
          +     # Add the subtracted ASCII