红题python全re,大佬帮帮我
查看原帖
红题python全re,大佬帮帮我
144287
dengwenjun楼主2021/9/15 16:03
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

2021/9/15 16:03
加载中...