Ass-14 CLP
Thu Aug 08 2024 22:50:01 GMT+0000 (Coordinated Universal Time)
Saved by
@k_m_s_avinash6
b=int(input())
a=int(input())
for i in range(1,a+1):
b=b+i
sn=b-1
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 or i==1:
s=s+str(sn)+" "
else:
if j==1:
s=s+str(sn)+" "
elif 1<j<i:
s=s+" "
else:
s=s+str(sn)
sn-=1
print(ls+s)
content_copyCOPY
Comments