此题一定要注意每个wave中间仅且只有一个空格,每个case之间也仅且只有一个空格,另外注意最后写成i!b||!t并不能AC,能不简化还是不要简化
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
#include<cctype>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int a,b;
cin>>a>>b;
for(int i=1;i<=b;i++)
{
for(int j=1;j<=a;j++)
{
for(int k=1;k<=j;k++)
cout<<j;
cout<<endl;
}
for(int j=a-1;j>=1;j--)
{
for(int k=1;k<=j;k++)
cout<<j;
cout<<endl;
}
if(i!=b||t!=0)
cout<<endl;
}
}
return 0;
}