-->
当前位置:首页 > 题库

PROGRAMMING:Here we are

Luz5年前 (2021-05-10)题库443
The word "Fu" is pasted upside down, which means "Fu arrives". Whether it is folk custom or not, please write a program to output all kinds of Chinese characters upside down. Each Chinese character to be processed here is composed of a grid of N $$\ times $$n, and the elements in the grid are either characters' @ 'or spaces. The characters used in the inverted Chinese characters are designated by the referee.
###Input format:
Input the characters used for the inverted Chinese characters in the first line, and the grid size n (a positive integer not exceeding 100), separated by a space; Then n lines, each line gives n characters, either '@' or space.
###Output format:
Output the inverted grid, as shown in the example. However, if the word is the same from the front to the back, first output 'Buyong Dao le', and then input the specified character to output it.
###Input sample 1:
```in
$ 9
@ @@@@@
@@@ @@@
@ @ @
@@@ @@@
@@@ @@@@@
@@@ @ @ @
@@@ @@@@@
@ @ @ @
@ @@@@@
```
###Output sample 1:
```out
$$$$$ $
$ $ $ $
$$$$$ $$$
$ $ $ $$$
$$$$$ $$$
$$$ $$$
$ $ $
$$$ $$$
$$$$$ $
```
###Input example 2:
```in
& 3
@@@
@
@@@
```
###Output example 2:
```out
bu yong dao le
&&&
&
&&&
```







answer:If there is no answer, please comment