Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. 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
|
Для отправки решений необходимо выполнить вход.
|