HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


280. 50477 - Character Pyramids

Guest
• Review clarifications (1)

Volume problems

• 180. 50755- Top N Donors - 1
• 185. 50784 - Top Growing Company
• 190. 50734 - Product Info (In Srt)
• 200. 50290 - Minimax Sum
• 210. 50361 - Align Two Lists
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids

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