n = int(input())
for i in range(0, n):
for j in range(0, n - i - 1):
print(" ", end="")
for k in range(0, 2 * i + 1):
print("*", end="")
print()
for l in range(n, 0, -1):
for m in range(0, n - l):
print(" ", end="")
for q in range(2 * l - 1, 0, -1):
print("*", end="")
print()
当n=4时,输出如下图案: