How to take more than one input and print the desired value as number of multiple inputs given?

good evening sir. i am unable to solve this question sir. please help me to solve this.

https://practice.geeksforgeeks.org/problems/cpp-loops-set-1-print-a-string-n-times/0

you have to use loop here

first take no of testcase
then in each testcase take n
then for each testcase you have to print a given string n times so again use a loop

see the Reference Code