2 added 505 characters in body
source | link

05AB1E, 14 bytes

Code:

…GCM‚øü׬)˜S×»

Uses the CP-1252 encoding. Try it online!

Explanation:

…GCM              # Push the string "GCM"
    ‚             # Wrap with the input
     ø            # Transpose the array
      ü×          # Compute the string product of each element (['A', 3] --> 'AAA')
        ¬)˜       # Get the last element and append to the list
           S      # Split the list
            ×     # Vectorized string multiplication with the second input
             »    # Join by newlines and implicitly print

05AB1E, 14 bytes

…GCM‚øü׬)˜S×»

Uses the CP-1252 encoding. Try it online!

05AB1E, 14 bytes

Code:

…GCM‚øü׬)˜S×»

Uses the CP-1252 encoding. Try it online!

Explanation:

…GCM              # Push the string "GCM"
    ‚             # Wrap with the input
     ø            # Transpose the array
      ü×          # Compute the string product of each element (['A', 3] --> 'AAA')
        ¬)˜       # Get the last element and append to the list
           S      # Split the list
            ×     # Vectorized string multiplication with the second input
             »    # Join by newlines and implicitly print
1
source | link

05AB1E, 14 bytes

…GCM‚øü׬)˜S×»

Uses the CP-1252 encoding. Try it online!