For this Question: Sara want to buy a toy and for this purpose she goes to a toy shop, there is a special offer going in the toy shop that is if you buy one toy you can get extra k toys for free now Sara wonders what is the minimum amount of money she need to spend so that she can get all the toys.

You are given some queries containing values of k you need to print the minimum amount of cost Sara need to spend to get all the toys for each value of k.First line contain number of toys N  and the number of queries Q
Second line contains the cost of the toys
Next Q line contains a single integer that is the value of k

Constraint:-
1<=N, Q<=100000
1<=Arr[i], k<=1000000
Output the minimum cost for each querySample Input :
6 2
100  20  50  10  2  5 
3
4


Sample Output :
7
7

Explanation:
She can buy toy at index 5 and get toys at index 1, 2, 3 for free than she buy toy at index 6 and get toy at index 4 for free so the total cost becomes 7 , I have written this Solution Code: toy,qu = map(int,input().split())
cost = list(map(int,input().split()))
cost=sorted(cost)
for i in range(qu):
    k=int(input())
    l=len(cost)
    t,s=0,0
    while(l>0):
        l=l-(k+1) 
        s=s+cost[t]
        t=t+1 
    print(s,end="\n"), In this Programming Language: Python, Now tell me if this Code is compilable or not?