| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 0 | 0 | 0 | 0.000% |
A word diamond is formed from a word that begins and ends with the same letter. Consider this word diamond for the word 'ENCODE':
E
N N
C C
O O
D D
E E
D D
O O
C C
N N
E
The leftmost letter of the diamond just touches the left margin. A shorter diamond, e.g., for the word 'DAD' looks like this:
D
A A
D D
A A
D
Write a program that reads in a word and prints the word diamond associated with that word.
A single line with a word that:
The word diamond itself. The word diamond for a word of length N has 2*N-1 lines. There are no spaces at the end of any line.
DAD
D A A D D A A D