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

PROGRAMMING:Beautiful character square final

Luz5年前 (2021-05-10)题库431
Input a string of small letters no more than 50 in length, and output the largest square formed by the character sequence.
###Input format:
A string of lowercase letters.
###Output format:
Enclose the string into the largest possible square for output. The string starts from the upper left of the square and circles clockwise.
###Input sample 1:
```in
a
```
###Output sample 1:
```out
a
```
###Input sample 2:
```
happy
```
###Output sample 2:
```
ha
pp
```
###Input sample 3:
```
abcdefghijklmn
```
###Output sample 3:
```
abcd
l e
k f
jihg
```






answer:If there is no answer, please comment