Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabetL-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula RectaTabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end
  • You can find all patterns of size 26 here

This is a , so do it in as few bytes as possible!

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end
  • You can find all patterns of size 26 here

This is a , so do it in as few bytes as possible!

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end
  • You can find all patterns of size 26 here

This is a , so do it in as few bytes as possible!

Tweeted twitter.com/StackCodeGolf/status/791061478610702336
added 12 characters in body
Source Link
Nathan Merrill
  • 14.5k
  • 3
  • 48
  • 128

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end
  • You can find all patterns of size 26 here

This is a , so do it in as few bytes as possible!

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end

This is a , so do it in as few bytes as possible!

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end
  • You can find all patterns of size 26 here

This is a , so do it in as few bytes as possible!

deleted 5 characters in body
Source Link
acrolith
  • 4k
  • 1
  • 24
  • 41

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end

This is a , so do it in as few charactersbytes as possible!

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end

This is a , so do it in as few characters as possible!

We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N.

For example, if N=5 and you were passed the L-phabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

You would need to output:

ABCDE
BBCDE
CCCDE
DDDDE
EEEEE

For the purposes of explanation, I'll be using only ABCD, instead of the full alphabet. You need to be able to match the L-phabet (above), as well as the following patterns:

The single line:

ABCD    or     A
               B
               C
               D

The single line repeated N times

ABCD    or    AAAA
ABCD          BBBB
ABCD          CCCC
ABCD          DDDD

The Tabula Recta:

ABCD
BCDA
CDAB
DABC

This alphabet triangle:

A      or   AAAAAAA
AB           BBBBB
ABC           CCC
ABCD           D
ABC
AB
A

We also have half triangles in lots of varieties:

A           AAAA      A        ABCD
BB          BBB       AB       ABC
CCC         CC        ABC      AB
DDDD        D         ABCD     A

Finally, the square:

AAAAAAA
ABBBBBA
ABCCCBA
ABCDCBA
ABCCCBA
ABBBBBA
AAAAAAA

All of the above patterns are of size 4. However, you will be passed a pattern of size 26, as well as an N between 1 and 26, and you need to scale the pattern. You do not need to handle any other patterns.

  • The output for 1 will always be the single character A
  • The output for 26 will always be the same, full-sized pattern passed in.
  • Trailing spaces are allowed at the end of each line, as well as a trailing newline at the end

This is a , so do it in as few bytes as possible!

Source Link
Nathan Merrill
  • 14.5k
  • 3
  • 48
  • 128
Loading