Ps:the input begins with a single positive integer in a line by itself indicating the number of the cases following, each Of them as described below. This was followed by a blank line, and there was also a blank line between the consecutive inputs.
Sample Input
3
2
Sample Output
1
22
333
22
1
1
22
333
22
1
Language:c++ 4.8.2
#include <stdio.h>intMainvoid){ intm, n, Total; intcopy_i; scanf ("%d", &Total ); while(total--) {scanf ("%d%d", &m, &N); while(n--) { for(inti =1; I <= m; i++) {copy_i=i; while(copy_i--) printf ("%d", i); printf ("\ n"); } for(inti = m1; I >=1; i--) {copy_i=i; while(copy_i--) printf ("%d", i); printf ("\ n"); } if(n)//There is a blank line after each separate waveform, excluding the last one.printf"\ n"); } if(total)//Ibid., lack of words WA. printf"\ n"); } return 0;}//PS: The key is the format, each of the two groups of two empty lines, a single group of triangular waves between a blank line.
Uva_488:triangle Wave