HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50322 - Snake Pattern

Guest
• Review clarifications (1)

Section problems

• 50253 - Timer
• 50294 - Centimeters to Yards
• 50298 - Coins
• 50303 - Pattern
• 50882 - FizzBuzz
• 50322 - Snake Pattern
• 50302 - Paper Scissors Rock
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50375 - Area of Circles
• 50393 - Palindromic Numbers
• 50396 - Cinema Tickets - 1
• 50325 - How much time passed?
• 50366 - Student Averages (2 Grades)

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