#C8207. Christmas Tree
Christmas Tree
Christmas Tree
Given a positive integer \( n \), generate a representation of a Christmas tree with \( n \) levels where each level is centered. The \( i\)-th level (0-indexed) should consist of \( 2i+1 \) asterisks (*
) and be padded with spaces so that the total width of each line equals \( 2n-1 \). For example, when \( n=3 \), the tree should be:
* *** *****
Your task is to read the integer \( n \) from the standard input and output the corresponding tree representation to the standard output.
inputFormat
The input consists of a single line containing an integer \( n \) (1 \le n \le 100
).
outputFormat
Output the Christmas tree with \( n \) levels. Each line must have exactly \( 2n-1 \) characters, with the appropriate number of spaces padding the asterisks so that the pattern is centered.
## sample1
*