mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
23 lines
423 B
C++
23 lines
423 B
C++
|
#include<iostream>
|
||
|
#include<string>
|
||
|
using namespace std;
|
||
|
char ch[25];
|
||
|
int main()
|
||
|
{
|
||
|
int n, i, j;
|
||
|
scanf("%d", &n);
|
||
|
while(n--)
|
||
|
{
|
||
|
int a, b;
|
||
|
scanf("%d%d%*c%s", &a, &b, ch);
|
||
|
printf("%d ", a);
|
||
|
for(i = 0; ch[i] != '\0'; i++)
|
||
|
{
|
||
|
for(j = 0; j < b; j++)
|
||
|
printf("%c", ch[i]);
|
||
|
}
|
||
|
printf("\n");
|
||
|
}
|
||
|
return 0;
|
||
|
}
|