Time limit
1s
Memory limit
128 MB
Given an integer N, print a star pattern of width 2N in 2N-1 lines. In the upper half, the number of stars on both sides increases from 1 to N while the gap in the middle decreases by two spaces each line. Then print the same shape in reverse for the lower half.
The first line contains an integer N.
Print 2N-1 lines. For each line, let k be the number of stars printed on one side. Print k stars, then 2(N-k) spaces, then k stars. The value of k increases from 1 to N and then decreases from N-1 to 1.