problem After receiving the string S, write a program that repeats each character R times to create a new string and print it out. That is, you can make P by repeating the first character R times and repeating the second character R times. S contains only the QR Code "alphanumeric" characters.
QR Code "alphanumeric" character is 0123456789ABCDEFGHIJK
Input The number T (1 ≤ T ≤ 1,000) of test cases is given in the first line. Each test case is given by dividing the number of repetitions R (1 RR 88) and the string S into spaces. The length of S is at least 1 and does not exceed 20 characters.
Output Output P for each test case.
input Example
2
3 ABC
5 /HTP
output Example
AAABBBCCC
/////HHHHHTTTTTPPPPP
My code:
#include<stdio.h>
int main() {
    int a=0;
    scanf("%d", &a);
    for (int k = 0; k < a; k++) {
        int d;
        char b[20];
        scanf("%d", &d);
        scanf("%s", &b);
        for (int i = 0; b[i]!=NULL; i++) {
            for (int j = 0; j < d; j++) {
                printf("%c", b[i]);
            }
        }
    }
}
 
     
    