Problem description must be upright. For example, we should be "honest" in our tests today.
The first question of each exam is always very simple, and today is no exception. This question requires output of a specified size "HDU" string. In particular, in order to reflect the word "positive, the output string is also square (the number of rows is equal to the number of columns ). The first line of input contains a positive integer n (n <= 20), indicating a total of N groups of data followed by N rows of data, each row contains a positive integer m (M <= 50), indicating that M "HDU" is connected in a row. Output outputs a square string of the specified size. For the output format, see sample data. Sample input212 sample outputhduhduhduhduhduhduhduhduhduhduhduhduhdu
1 #include <stdio.h> 2 3 int main(){ 4 int T; 5 int number; 6 int i; 7 int j; 8 9 scanf("%d",&T);10 11 while(T--){12 scanf("%d",&number);13 14 for(i=0;i<number*3;i++){15 for(j=0;j<number;j++)16 printf("HDU");17 18 printf("\n");19 } 20 } 21 return 0;22 }
Be an upright hangdian man