你好我用相似的方法为什么过不了 while True: try: import numpy as np a = int(input()) res = np.zeros([a,a], int) num = 1 for i in range(a): for j in range(i+1): res[i-j][j] = num num = num + 1 for lists in res: temp = [] for i in lists: if i != 0: temp.append(str(i)) print(" ".join(temp)) except: break
点赞

相关推荐

Aurora23:属于挂一半,暂时进池子了,隔一段时间没有其他组捞的话就彻底结束了
点赞 评论 收藏
分享
09-08 17:17
同济大学 Java
狗不理fe:里面的人劝一句,别来虾,我们部门24校招生淘汰率30%,还有一些人说有一年保护期,不可能!!!
我的秋招日记
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务