ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Фёдор Меньшиков. Тренировки > задача:


017. 50537 - esreveR Triangle

Гость
• Вопросы к жюри (1)

Задачи сборника

• 007. 50401 - Sum of Odd Numbers
• 009. 50783 - Numri me i vogel
• 010. 50782 - Max of N integers
• 012. 50352 - Selling Cows
• 012. 50589 - Numri i vezeve te shitura
• 015. 50466 - Drawing Square From...
• 016. 50463 - Drawing a Triangle
• 017. 50423 - Numbers square
• 017. 50537 - esreveR Triangle
• 018. 50344 - Profit or Loss
• 018. 50491 - Brokers
• 018. 50787 - Expected Value
• 019. 50438 - Pattern with stars
• 020. 50485 - Center of gravity of a ...
• 020. 50408 - Molecules
• 022. 50366 - Student Averages (2 G...
• 023. 50437 - Age Labeling

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

esreveR Triangle

Draw a reverse triangle with the given size (n) and given chars. When drawing the triangle, at the beginning of everyline, give some space, such that

  • the first line will have n-1 space and then 1 char
  • the second line will have n-2 spaces and then 2 chars
  • the third line will have n-3 spaces and then 3 chars
  • etc.
Then, every line starts with the first char and it's followed by the second, and so on.

Question: Write a program, that is going to take the size of triangle and two chars. And draw the described triangle.

Input specification
You will be given one integer (n) and two chars 0 ≤ n ≤ 100. The chars are 26 uppercase or lowercase English characters.

Output specification
Draw the described triable.

Sample Input I
5 b n
Sample Input II
7 x t

Sample Output I
    b
   bn
  bnb
 bnbn
bnbnb
Sample Output II
      x
     xt
    xtx
   xtxt
  xtxtx
 xtxtxt
xtxtxtx



Для отправки решений необходимо выполнить вход.

www.contester.ru