题解 | #蛇形矩阵#
蛇形矩阵
https://www.nowcoder.com/practice/649b210ef44446e3b1cd1be6fa4cab5e
a=int(input()) for i in range(1,a+1): for j in range(i,a+1): b=int((j*(j+1)+2)/2-i) if j==a and i!=a: print(b,end='\n') elif i==a: print(b,end='') else : print(b,end=' ')