0%
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| a = int(input())
result = [] pre_0 = 1 for i in range(a): path = [] path.append(i+pre_0) pre_0 = path[0] result.append(path)
below = [] for i in range(a-1,-1,-1): if below != []: result[i].extend(below) below = map(lambda x:x+1,result[i]) else: below = map(lambda x:x+1,result[i])
for value in result: print(' '.join(map(str,value)))
|