from math import comb n=int(input()) i=0 while i<n: j=0 while j<=n: if comb(i,j)!=0: if j==i: print(comb(i,j)) else: print(comb(i,j),end=' ') j+=1 i+=1
本地测好像没问题啊,然后提交全re