Don't Understand the problem statement


#1

Please explain what problem wants to ask


#2

In the first test case A = 12 and the array of friends is [ 3, 4]
So the output is 4 times the first friend that is [ 3, 3, 3, 3]
Since the index of 3 is 0 so output is [ 0, 0, 0, 0]

Similarly for second testcase A = 11 B = [6, 8, 5, 4, 7]
So the answer is the sequence [6, 5] is written in the form of their indices [0, 2]