Pyramid of the symbols
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Vasya wants to print on your printer pyramid of some sort of symbol height h. Write a program that will help him in this, not forgetting that the program must be "economically viable", i.e. to print the least amount of characters.
Examples of pyramids are shown in the examples of input and output data. For clarity, printed blanks are replaced by point.
Input
In a single line given first symbol, by which must be printed pyramid, and then through a gap and a positive integer specifying the height of the pyramid h (h ≤ 50).
Output
In the first line print the total number of "printing" characters and below the pyramid itself.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 9K
Acceptance rate 46%