{"raw_statement":[{"iden":"statement","content":"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.\n\nA single number representing the base of the pyramid.\n\nPrint the pyramid using \"X\"'s \n\nDon't forget to add spacing on the left side so that it doesn't end up looking like a right triangle.\n\n"},{"iden":"input","content":"A single number representing the base of the pyramid."},{"iden":"output","content":"Print the pyramid using \"X\"'s "},{"iden":"note","content":"Don't forget to add spacing on the left side so that it doesn't end up looking like a right triangle."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ denote the base width of the pyramid.  \n\n**Constraints**  \n$ n \\geq 1 $, and $ n $ is odd or even; the pyramid terminates when the top layer has width 1 or 2.  \n\n**Objective**  \nConstruct a pyramid with layers $ k = 0, 1, \\dots, m-1 $, where:  \n- Layer $ k $ has width $ w_k = n - 2k $,  \n- The pyramid stops when $ w_k \\in \\{1, 2\\} $,  \n- Each layer is centered by prepending $ \\left\\lfloor \\frac{n - w_k}{2} \\right\\rfloor $ spaces,  \n- Each layer is composed of $ w_k $ characters 'X'.  \n\nOutput the pyramid as a sequence of strings, one per layer, from bottom to top.","simple_statement":"Given a number for the pyramid base, print a pyramid with \"X\"s, each row 2 shorter than the one below, centered, until the top is 1 or 2 \"X\"s. Add leading spaces to center it.","has_page_source":false}