HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50322 - Snake Pattern

Guest
• Review clarifications (1)

Volume problems

• 155. 50334 - What is the class aver...
• 185. 50784 - Top Growing Company
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids
• 50304 - Number Pattern
• 50492 - Contest Scoreboard
• 50322 - Snake Pattern
• 50321 - Missing Number
• 50445 - Cryptography
• 50410 - Zero Padding
• 50380 - Sum of the Numbers in the ...
• 50400 - nth Row rth Element of a Table
• 50457 - The Number of Winners
• 50585 - Inner Product
• 50587 - Modular Conversion

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 Halil Karimis.

Snake Pattern

Andy is addicted to the snake game. So he wants to make a pattern that resembles a snake does when it moves.

You are asked to create the following pattern in a NxN grid;

Input specification
An integer number N.

Output specification
The pattern without any space

Sample Input I
3
Sample Input II
5
Sample Input III
8
Sample Output I
..S
SSS
S..
Sample Output II
....S
SSSSS
S....
SSSSS
....S
Sample Output III
.......S
SSSSSSSS
S.......
SSSSSSSS
.......S
SSSSSSSS
S.......
SSSSSSSS


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

www.contester.ru