সমস্যা ও সমাধান বই - ১ এর উপর অনুশীলন ( Practice code for Problem and Solutions Book - 1 by Mahbubul Hasan )
Commit Time | 15 Oct 2017 14:44 |
n = int(input())
table = [[0]*n for j in range(n)]
k = 1
for i in range(n-1, -n-1, -1):
j = max(i, 0)
i = max(0, i*-1)
while i < n and j < n:
table[i][j] = str(k)
k += 1
i += 1
j += 1
print('\n'.join([' '.join(line) for line in table]))