HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > "Informatics Stars" Online Contests - 2011-2014 > problem:


2012-03-04. 50597 - Drawing Diamonds

"Informatics Stars" Online Contests - 2011-2014

Start: Oct.20.2012 at 10:00:00 AM
Finish: Oct.20.2012 at 03:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 2012-02-2. 50577 - Perfect Numbers...
• 2012-02-4. 50594 - Transformations
• 2012-02-5. 50768 - Where is Waldorf?
• 2012-02-7. 50704 - Connected?
• 2012-02-8. 50596 - Your Ride Is He...
• 2012-02-8. 50596 - Your Ride Is He...
• 2012-03-01. 50563 - Long Modulus
• 2012-03-02. 50567 - Input Data No...
• 2012-03-04. 50597 - Drawing Di...
• 2012-10-02. 50555 - Frequency of L...
• 2012-10-04. 50598 - Minimum Sum
• 2012-11-30. 50656 - Divisibility by 11
• 2012-11-40. 50558 - Biggest Barn
• 2012-12-10. 50546 - Average Fuel P...
• 2012-12-20. 50574 - Triangular Nu...
• 2012-12-30. 50684 - Sum of prime ...
• 2013-01-10. 50584 - Total invoice ...

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.
Prepared by Ibrahim Mesecan.

Drawing Diamonds

Shqip

You are going to be given a number and a char. Write a program that draws a diamond with the given size and char.

Input specification
You will be given an integer n (where 1 ≤ n < 100), and a char from ASCII table.
Note: For convenience, n will be an odd number.

Output specification
Draw a diamond using the given character and size. When drawing it, the height of the diamond (the number of lines) will be equal to the given number n.

At the beginning of every line (except the mid line), there will be some space. The number of spaces at the beginning of every line will first decrease, after the mid line, it will increase again. Pay attention that the number of characters on every line changes, too.


Sample Input 1
7 #
Sample Output 1
   #
  # #
 # # #
# # # #
 # # #
  # #
   #

Sample Input 2
5 *
Sample Output 2
  *
 * *
* * *
 * *
  *


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

www.contester.ru