시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 13898 7366 6677 56.119%

문제

문자열 S를 입력받은 후에, 각 문자를 R번 반복해 새 문자열 T를 만든 후 출력하는 프로그램을 작성하시오.

다시 설명하자면, 첫 번째 문자를 R번 반복하고, 두 번째 문자를 R번 반복하는 식으로 T를 만들면 된다. S에는 QR Code "alphanumeric" 문자만 들어있다.

QR Code "alphanumeric" 문자는 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\$%*+-./: 이다.

입력

첫째 줄에 테스트 케이스의 개수 T(1 <= T <= 1,000)가 주어진다. 각 테스트 케이스는  반복 횟수 R(1 <= R <= 8), 문자열 S가 공백으로 구분되어 주어진다. S의 길이는 적어도 1이며, 20글자를 넘지 않는다. 

출력

각 테스트 케이스에 대해 T를 출력한다.

예제 입력 1

2
3 ABC
5 /HTP

예제 출력 1

AAABBBCCC
/////HHHHHTTTTTPPPPP
W3sicHJvYmxlbV9pZCI6IjI2NzUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWJiMzhcdWM3OTBcdWM1ZjQgXHViYzE4XHViY2Y1IiwiZGVzY3JpcHRpb24iOiI8cD5cdWJiMzhcdWM3OTBcdWM1ZjQgU1x1Yjk3YyBcdWM3ODVcdWI4MjVcdWJjMWJcdWM3NDAgXHVkNmM0XHVjNWQwLCBcdWFjMDEgXHViYjM4XHVjNzkwXHViOTdjIFJcdWJjODggXHViYzE4XHViY2Y1XHVkNTc0IFx1YzBjOCBcdWJiMzhcdWM3OTBcdWM1ZjQgVFx1Yjk3YyBcdWI5Y2NcdWI0ZTAgXHVkNmM0IFx1Y2Q5Y1x1YjgyNVx1ZDU1OFx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkNTU4XHVjMmRjXHVjNjI0LjxcL3A+XHJcblxyXG48cD5cdWIyZTRcdWMyZGMgXHVjMTI0XHViYTg1XHVkNTU4XH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+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

ACM-ICPC > Regionals > North America > Greater New York Region > 2011 Greater New York Programming Contest A번

  • 문제를 번역한 사람: baekjoon
  • 잘못된 데이터를 찾은 사람: pichulia