HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50438 - Pattern with stars

Guest
• Review clarifications (2)

Section problems

• 50387 - Passengers in the Train
• 50391 - Cinema Tickets
• 50402 - Hello World!
• 50489 - Football Championship
• 51004 - Word Search Game
• 50430 - ATM
• 50426 - Calculating Sales
• 50425 - Calculating Weekly Pay
• 50438 - Pattern with stars
• 50820 - Post Office
• 50810 - Print Office
• 50952 - Derby Tirana
• 50443 - Dajte Express
• 50819 - Linked Numbers
• 50519 - Image Filtering
• 50798 - Passing the course
• 50799 - OSHEE Electric Bill

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 Erisa Terolli.

Pattern with stars

Draw a square in which only the sides and diagonals are marked by stars as shown in the image.

Input specification
There will be one integer (n) which will determine the size of the square where 5 ≤ n ≤ 30.

Output specification
Draw a pattern as in the examples which is followed by an endline char.

 Sample Input I     Sample Input II   
 5  8
*****
** **
* * *
** **
*****
********
**    **
* *  * *
*  **  *
*  **  *
* *  * *
**    **
********

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

www.contester.ru