编辑代码
Python代码
3.11.0
2.7.17
运行
def
number2
(
n
):
for
i
in
range(
1
, n +
1
): print((str(i) +
" "
) * i) n =
6
# 可以替换为任意正整数
number2(n)