문제
2675 문자열 반복
답
kotlin code
import java.util.*
fun main() {
q2675()
}
fun q2675() = with(Scanner(System.`in`)) {
val inputs = List(nextInt()) { Pair(nextInt(), next().toCharArray()) }
for(input in inputs) {
val sb = StringBuilder(input.second.count() * input.first)
for(char in input.second) {
for (i in 1..input.first) {
sb.append(char)
}
}
println(sb)
}
}