b=int(input())
a=int(input())
for i in range(1,a+1):
i=a+1-i
s=""
ls=" "*(a-i)
for j in range(1,i+1):
if i==a:
s=s+str(b)+" "
else:
if j==1:
s=s+str(b)+" "
elif 1<j<i:
s=s+" "
else:
s=s+str(b)
b+=1
print(ls+s)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter