407139: GYM102697 110 Pyramid

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

110. Pyramidtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Much like the previous question, you are going to be making some ASCII art. In this question your job is to make a pyramid given a number that represents the base of the pyramid. Each layer going up from the base should be 2 less in length than the previous layer. The pyramid is complete when the length of the top layer is either 1 or 2.

Input

A single number representing the base of the pyramid.

Output

Print the pyramid using "X"'s

ExampleInput
7
Output
   X
  XXX
 XXXXX
XXXXXXX

Note

Don't forget to add spacing on the left side so that it doesn't end up looking like a right triangle.

加入题单

算法标签: