Skip to main content
Commonmark migration
Source Link

#05AB1E, 7 bytes

05AB1E, 7 bytes

Code:

3×g©×®£

Explanation:

3×        # Multiply the input string three times.
  g       # Take the length.
   ©      # Copy that to the register.
    ×     # Multiply by the second input.
     ®    # Retrieve the length from the register.
      £   # Only keep [0:length * 3] from the new string.

Try it online!.

#05AB1E, 7 bytes

Code:

3×g©×®£

Explanation:

3×        # Multiply the input string three times.
  g       # Take the length.
   ©      # Copy that to the register.
    ×     # Multiply by the second input.
     ®    # Retrieve the length from the register.
      £   # Only keep [0:length * 3] from the new string.

Try it online!.

05AB1E, 7 bytes

Code:

3×g©×®£

Explanation:

3×        # Multiply the input string three times.
  g       # Take the length.
   ©      # Copy that to the register.
    ×     # Multiply by the second input.
     ®    # Retrieve the length from the register.
      £   # Only keep [0:length * 3] from the new string.

Try it online!.

Source Link
Adnan
  • 44.5k
  • 6
  • 82
  • 246

#05AB1E, 7 bytes

Code:

3×g©×®£

Explanation:

3×        # Multiply the input string three times.
  g       # Take the length.
   ©      # Copy that to the register.
    ×     # Multiply by the second input.
     ®    # Retrieve the length from the register.
      £   # Only keep [0:length * 3] from the new string.

Try it online!.