* Memory Limit: 256MB
* Time Limit: 1sec
----------
Pari loves spiderman and how he hangs upside down from the ceiling, so she likes to rotate everything. Right now she is rotating tables of letters. She wrote an $R \times C$ table onto a piece of paper. She has also chosen an angle $K$, a multiple of $45$, and wants to rotate her table that many degrees clockwise.
It turns out this task is a bit too hard for Pari, so help her out.
# Input
The first line contains two integers $R$ and $C$, the number of rows and columns in Pari's table.
Each of the next $R$ lines contains one row of Pari's table, a string of $C$ lowercase letters.
The last line contains an integer $K$, a multiple of $45$ between $0$ and $360$ (inclusive).
$$1 \le R \le 10$$
$$1 \le C \le 10$$
# Output
Output Pari's table rotated $K$ degrees clockwise. The output must
contain the smallest number of rows and columns possible. Some rows may have some leading spaces, but extra leading or trailing space is now allowed.
## Sample Input 1
```
3 4
pari
sina
mari
45
```
## Sample Output 1
```
p
s a
m i r
a n i
r a
i
```
## Sample Input 2
```
3 4
pari
sina
mari
90
```
## Sample Output 2
```
msp
aia
rnr
iai
```
## Sample Input 3
```
3 4
pari
sina
mari
315
```
## Sample Output 3
```
i
r a
a n i
p i r
s a
m
```
Spider-Man: Across the Spider-Verse (2022)
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.