Skip to main content
Commonmark migration
Source Link

#Japt, 12 bytes

Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it


##Explanation :Implicit input of string U Ë :Map each character D at 0-based index E pE : Repeat D E times + : Append to D \n :Reassign to U ¬ :Split to character array £ :Map each element X at 0-based index Y °Y : Increment Y çX : Repeat X Y times h : Replace the first Y characters in U with that

Explanation

            :Implicit input of string U
Ë           :Map each character D at 0-based index E
  pE        :  Repeat D E times
 +          :  Append to D
\n          :Reassign to U
¬           :Split to character array
 £          :Map each element X at 0-based index Y
   °Y       :  Increment Y
     çX     :  Repeat X Y times
  h         :  Replace the first Y characters in U with that

#Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it


##Explanation :Implicit input of string U Ë :Map each character D at 0-based index E pE : Repeat D E times + : Append to D \n :Reassign to U ¬ :Split to character array £ :Map each element X at 0-based index Y °Y : Increment Y çX : Repeat X Y times h : Replace the first Y characters in U with that

Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it


Explanation

            :Implicit input of string U
Ë           :Map each character D at 0-based index E
  pE        :  Repeat D E times
 +          :  Append to D
\n          :Reassign to U
¬           :Split to character array
 £          :Map each element X at 0-based index Y
   °Y       :  Increment Y
     çX     :  Repeat X Y times
  h         :  Replace the first Y characters in U with that
added 460 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it


##Explanation :Implicit input of string U Ë :Map each character D at 0-based index E pE : Repeat D E times + : Append to D \n :Reassign to U ¬ :Split to character array £ :Map each element X at 0-based index Y °Y : Increment Y çX : Repeat X Y times h : Replace the first Y characters in U with that

#Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it

#Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it


##Explanation :Implicit input of string U Ë :Map each character D at 0-based index E pE : Repeat D E times + : Append to D \n :Reassign to U ¬ :Split to character array £ :Map each element X at 0-based index Y °Y : Increment Y çX : Repeat X Y times h : Replace the first Y characters in U with that

Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt, 12 bytes

Takes input as a string, outputs an array of strings.

Ë+pE
¬£h°YçX

Try it