HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50477 - Character Pyramids

Guest
• Review clarifications (1)

Section problems

• 50313 - Pattern Displays
• 50375 - Area of Circles
• 50393 - Palindromic Numbers
• 50396 - Cinema Tickets - 1
• 50325 - How much time passed?
• 50366 - Student Averages (2 Grades)
• 50406 - Draw Pattern 178
• 50416 - Placing Dominoes on Chess...
• 50477 - Character Pyramids
• 50498 - K-Means
• 50505 - kht Puzzle
• 50346 - The Biggest Date
• 50512 - Coding redundancy
• 50528 - Rock-Scissors-Paper
• 50493 - n-digit kth Prime Number
• 50520 - Filling a Matrix Randomly
• 50357 - Convert Euros into Dollars

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