HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


280. 50477 - Character Pyramids

Guest
• Review clarifications (1)

Volume problems

• 125. 50538 - Sum of kth Diagonal
• 140. 50599 - Sum of Squared Error ...
• 15-SprPrE1-80. 50741 - DNA Distance
• 155. 50334 - What is the class aver...
• 185. 50784 - Top Growing Company
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids
• 50304 - Number Pattern
• 50492 - Contest Scoreboard
• 50322 - Snake Pattern
• 50321 - Missing Number
• 50445 - Cryptography
• 50410 - Zero Padding
• 50380 - Sum of the Numbers in the ...
• 50400 - nth Row rth Element of a Table

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Saadi Myftia.

Character Pyramids

{By Saadi Myftia}

Question: You are given a letter (ch) and a number (n). Print a pattern like the one shown in the samples.

Input specification
You will be given a character between 'A' and 'M', then an integer number (n) which shows the number of pyramids you have to print where 1 ≤ n ≤ 20.

Output specification
Simply print the pyramids like specified.

 Sample Input I     Sample Input II   
 D 2
 C 4
 Sample Output I     Sample Output II   
   A     A
  BCB   BCB
 CDEDC CDEDC
DEFGFEDEFGFED

  A   A   A   A
 BCB BCB BCB BCB
CDEDCDEDCDEDCDEDC


Note: This is a format checking question, so every space or end-line char becomes important in such questions. Please pay attention that there is an endline, at the end of program.
Для отправки решений необходимо выполнить вход.

www.contester.ru