-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path00488.cpp
More file actions
38 lines (35 loc) · 778 Bytes
/
00488.cpp
File metadata and controls
38 lines (35 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <bits/stdc++.h>
using namespace std;
int main()
{
//freopen("in.txt", "rt", stdin);
//freopen("out.txt", "w+t", stdout);
int t,a,f;
cin>>t;
while(t--)
{
cin>>a>>f;
for(int i=0;i<f;i++)
{
for(int j=1;j<=a;j++)
{
for(int k=0;k<j;k++)
{
printf("%d",j);
}
printf("\n");
}
for(int j=a-1;j>=1;j--)
{
for(int k=0;k<j;k++)
{
printf("%d",j);
}
printf("\n");
}
if(t!=0 || i!=f-1)
printf("\n");
}
}
return 0;
}