티스토리 뷰

N = int(input())
minus = 1

for Repeat in range(0, 2 * N - 1):
	if 2 * N - Repeat > N:
		for repeat in range(0, Repeat):
			print(" ", end = "")
		for Rpt in range(0, 2 * N - minus):
			print("*", end = "")
		minus += 2
		if Repeat == N - 1:
			minus -= 4
	else:
		for repeat in range(0, 2 * N - Repeat - 2):
			print(" ", end = "")
		for Rpt in range(0, 2 * N - minus):
			print("*", end = "")
		minus -= 2
	print("")


댓글
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Total
Today
Yesterday