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

Турниры > Lab10 - CEN ECE > задача:


50463 - Drawing a Triangle

Lab10 - CEN ECE

Старт: 28.ноя.2023 в 00:14:08
Финиш: 14.дек.2023 в 23:14:08
Турнир завершён!
• Турнирная таблица

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

Задачи турнира

• 50423 - Numbers square
• 50394 - Water Bills
• 50733 - The Highest Average
• 50366 - Student Averages (2 Grades)
• 50501 - The Highest Average
• 50463 - Drawing a Triangle
• 50466 - Drawing Square From Stars
• 14-FallResit-10. 50537 - esreveR Tri...
• 14-Spr2-40. 50438 - Pattern with stars
• 15-Fall-01. 50806 - TVSH
• 15-FallHW-1. 50820 - Post Office
• 15-PE-3. 50867 - Average of the Be...
• 2013-04-60. 50295 - Weighted Aver...
• 9-P4. 50899 - How Many Years

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

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

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

Drawing a Triangle

Question:
Write a program that gets a number n then, draws a triangle using the given char with the size n.

Input specification
You will be given a number (n) and a character ch where n is the height of the triangle.
Then

  • in the first line of the triangle, you will have just one char
  • in the second line of the triangle, you will have two chars, separated by a space
  • in the nth line of the triangle, you will have n chars, separated by spaces
where 0 ≤ n ≤ 30.

Output specification
Show a triangle from the given char (and every char is followed by a space char).

Sample Input I   
4 c

Sample Input II   
6 x
Sample Output I   
c
c c
c c c
c c c c
Sample Output II  
x
x x
x x x
x x x x
x x x x x
x x x x x x


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

www.contester.ru