Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Update MATL Online URL
Source Link
Suever
  • 11.2k
  • 1
  • 24
  • 52

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online! MATL Online!

Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space
Commonmark migration
Source Link

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

###Explanation

Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

###Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space
added 708 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

###Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

MATL, (削除) 24 (削除ここまで) 23 bytes

''jt8+t1)wdh26X\Ys(26e!

Uses lowercase letters.

Try it at MATL Online!

###Explanation

'' % Push empty string
jt % Push input string. Duplicate
8+ % Add 8 to each char (ASCII code). This transforms 'a' 105,
 % 'b' into 106, which modulo 26 correspond to 1, 2 etc
t1) % Duplicate. Get first entry
wd % Swap. COnsecutive differences.
h % Concatenate horizontally
26X\ % 1-based modulo 26. This gives a result from 1 to 26
Ys % Cumulative sum
( % Write values (converted into chars) at specified positions
 % of the initially empty string
26e % Reshape into a 26-row char matrix, padding with char 0
! % Transpose. Implicitly display. Char 0 is shown as space
added 37 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading

AltStyle によって変換されたページ (->オリジナル) /