///...................SUBHASHIS MOLLICK....................///
///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING....///
///.............ISLAMIC UNIVERSITY,BANGLADESH.............///
///.....................SESSION-(14-15)....................///
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<ctype.h>
#include<bits/stdc++.h>
using namespace std;
main()
{
long int i,n,count,count1=0;
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
if(count1>0)
printf("\n");
count1=1;
long int a,b,j,k,m=1,i1;
scanf("%ld%ld",&a,&b);
count=0;
for(i1=1;i1<=b;i1++)
{
if(count>0)
printf("\n");
count=1;
for(j=1;j<=a;j++)
{
for(k=1;k<=j;k++)
{
printf("%ld",j);
}
printf("\n");
//m++;
}
for(j=a-1;j>=1;j--)
{
for(k=j;k>=1;k--)
{
printf("%ld",j);
}
printf("\n");
}
//count++;
}
}
}
///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING....///
///.............ISLAMIC UNIVERSITY,BANGLADESH.............///
///.....................SESSION-(14-15)....................///
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<ctype.h>
#include<bits/stdc++.h>
using namespace std;
main()
{
long int i,n,count,count1=0;
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
if(count1>0)
printf("\n");
count1=1;
long int a,b,j,k,m=1,i1;
scanf("%ld%ld",&a,&b);
count=0;
for(i1=1;i1<=b;i1++)
{
if(count>0)
printf("\n");
count=1;
for(j=1;j<=a;j++)
{
for(k=1;k<=j;k++)
{
printf("%ld",j);
}
printf("\n");
//m++;
}
for(j=a-1;j>=1;j--)
{
for(k=j;k>=1;k--)
{
printf("%ld",j);
}
printf("\n");
}
//count++;
}
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন