— Hey folks, how do you like this problem?

— That'll do it. 

BThero is a powerful magician. He has got $n$ piles of candies, the $i$-th pile initially contains $a_i$ candies. BThero can cast a copy-paste spell as follows:   He chooses two piles $(i, j)$ such that $1 \le i, j \le n$ and $i \ne j$.  All candies from pile $i$ are copied into pile $j$. Formally, the operation $a_j := a_j + a_i$ is performed. 

BThero can cast this spell any number of times he wants to — but unfortunately, if some pile contains strictly more than $k$ candies, he loses his magic power. What is the maximum number of times BThero can cast the spell without losing his power?


-----Input-----

The first line contains one integer $T$ ($1 \le T \le 500$) — the number of test cases.

Each test case consists of two lines:   the first line contains two integers $n$ and $k$ ($2 \le n \le 1000$, $2 \le k \le 10^4$);  the second line contains $n$ integers $a_1$, $a_2$, ..., $a_n$ ($1 \le a_i \le k$). 

It is guaranteed that the sum of $n$ over all test cases does not exceed $1000$, and the sum of $k$ over all test cases does not exceed $10^4$.


-----Output-----

For each test case, print one integer — the maximum number of times BThero can cast the spell without losing his magic power.


-----Example-----
Input
3
2 2
1 1
3 5
1 2 3
3 7
3 2 2

Output
1
5
4



-----Note-----

In the first test case we get either $a = [1, 2]$ or $a = [2, 1]$ after casting the spell for the first time, and it is impossible to cast it again.

Starter code:

Solutions:
import math
t = int(input())
for test in range(t):
    n,k = map(int,input().split())
    A = list(map(int,input().split()))
    A.sort()
    ans = 0
    for i in range(1,n):
        if(A[i]>k):
            ans = 0
            break
        rem = k-A[i]
        ans+=rem//A[0]
    print(ans)

t = int(input())

for _ in range(t):
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    
    a.sort()
    ct = 0
    
    for i in range(1, n):
        ct += (k-a[i])//a[0]
        
    print(ct)

for _ in range(int(input())):
    n,k = map(int,input().split())
    A = list(map(int,input().split()))
    A.sort()
    ans = 0
    for i in range(1,n):
        if(A[i]>k):
            ans = 0
            break
        rem = k-A[i]
        ans+=rem//A[0]
    print(ans)

#   ==========     //\\       //||     ||====//||
#       ||        //  \\        ||     ||   // ||
#       ||       //====\\       ||     ||  //  ||
#       ||      //      \\      ||     || //   ||
#   ========== //        \\  ========  ||//====|| 
#  code

def solve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    a.sort()
    ans = 0
    for i in a[1:]:
        ans += (k - i) // a[0]
    print(ans)
    return

def main():
    t = 1
    t = int(input())
    for _ in range(t):
        solve()

def __starting_point():
    main()
__starting_point()

t = int(input())
for _ in range(t):
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    a.sort()
    m = a[0]
    a = a[1:]
    total = 0
    for b in a:
        total += (k-b)//m

    print(total)

import math
t=int(input())
for _ in range(t):
    n,k=list(map(int,input().split()))
    a=list(map(int,input().split()))
    a.sort()
    b=a[0]
    sumi=0
    for i in range(1,n):
        c=k-a[i]
        sumi+=c//b
    print(sumi)


import sys
import random
from fractions import Fraction
from math import *
from decimal import *
 
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())

def finput():
    return float(input())

def tinput():
    return input().split()

def linput():
    return list(input())
 
def rinput():
    return list(map(int, tinput()))

def fiinput():
    return list(map(float, tinput()))
 
def rlinput():
    return list(map(int, input().split()))
def trinput():
    return tuple(rinput())

def srlinput():
    return sorted(list(map(int, input().split())))

def NOYES(fl):
    if fl:
        print("NO")
    else:
        print("YES")
def YESNO(fl):
    if fl:
        print("YES")
    else:
        print("NO")
    
def modst(a, s):
    res = 1
    while s:
        if s % 2:
            res =res * a %998244353
        a *= a
        a = a % 998244353
        s //= 2
    return res



    
def main():
    #n = iinput()
    #k = iinput() 
    #m = iinput() 
    #n = int(sys.stdin.readline().strip()) 
    n, k = rinput()
    #n, m = rinput()
    #m, k = rinput()
    #n, k, m = rinput()
    #n, m, k = rinput()
    #k, n, m = rinput()
    #k, m, n = rinput() 
    #m, k, n = rinput()
    #m, n, k = rinput()
    q = srlinput()
    #q = linput()
    res = 0
    for i in range(1, n):
        res += (k - q[i]) // q[0]
    print(res)
           
        
            
    
    
    
    
    
    
            
                
        
    
            
        

            
        
    
                
    
    
    
            
    
        
    

for i in range(iinput()):
    main()
    


from sys import stdin
###############################################################
def iinput(): return int(stdin.readline())
def minput(): return list(map(int, stdin.readline().split()))
def linput(): return list(map(int, stdin.readline().split()))
###############################################################


t = iinput()
while t:
    t -= 1
    n, k = minput()
    a = linput()
    a.sort()
    ans = 0
    for i in range(1, n):
        ans += max(0, k - a[i]) // a[0]
    print(ans)


def solve(n,k):
    s=list(map(int,input().split()))
    s.sort()
    ans=0
    p=s[0]
    for i in range(1,n):
        ans+=((k-s[i])//p)
    print(ans)


for _ in range(int(input())):
    n,k=map(int,input().split())
    solve(n,k)

for _ in range(int(input())):
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    m = min(a)
    ind = a.index(m)
    ans = 0
    for i in range(n):
        if i == ind:
            continue
        ans += (k - a[i]) // m
    print(ans)

import sys
import math
def II():
	return int(sys.stdin.readline())
 
def LI():
	return list(map(int, sys.stdin.readline().split()))
 
def MI():
	return list(map(int, sys.stdin.readline().split()))
 
def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
    n,k = MI()
    a = LI()
    a.sort()
    count = 0
    for i in range(1,n):
        b = max(k-a[i],0)
        count+=b//a[0]
    print(count)


#Codeforces Round #673
#Problem A
import sys

#
#BEGIN TEMPLATE
#
def input(): return sys.stdin.readline()[:-1]
def getInt(): return int(input())
def getIntIter(): return list(map(int, input().split()))
def getIntList(): return list(getIntIter())
def flush(): sys.stdout.flush()
#
#END TEMPLATE
#

for _ in range(getInt()):
    n,k = getIntIter()
    nums = getIntList()
    m = min(nums)
    ans = 0
    for num in nums:
        ans += (k-num)//m
    ans -= (k-m)//m
    print(ans)


for _ in range(int(input())):
    n, k = list(map(int, input().split()))
    *arr, = list(map(int, input().split()))
    cnt = 0
    mn = min(arr)
    arr.remove(mn)
    for v in arr:
        cnt += (k - v) // mn
    print(cnt)







t = int(input())
for _ in range(t):
    n,k = [int(x) for x in input().split()]
    l = [int(x) for x in input().split()]
    ans = 0
    m = min(l)
    mi = l.index(m)
    for i in range(n):
        if i!=mi:
            ans+=max((k-l[i])//m,0)
    print(ans)


'''Author- Akshit Monga'''
t=int(input())
for _ in range(t):
    n,k=map(int,input().split())
    arr=[int(x) for x in input().split()]
    m=min(arr)
    ans=0
    for i in arr:
        ans+=(k-i)//m
    print(ans-(k-m)//m)

from sys import stdin
input = stdin.readline
for _ in range(int(input())):
    n,x = list(map(int,input().split()))
    a = sorted(list(map(int,input().split())),reverse=True)
    g = a.pop()
    ans = 0
    for i in a:
        ans += max(0,(x-i)//g)
    print(ans)