d,g = list(map(int, input().split()))

p = []

c = []

for i in range(d):

    a,b = list(map(int, input().split()))

    p.append(a)

    c.append(b)

    

dp = [0 for i in range(sum(p) + 2)] 

for i in range(1,d+1):

    count_max = p[i-1]

    bonus = c[i-1]

    for j in range(sum(p)+1,0,-1):

        for k in range(1,count_max+1):

            if k < count_max:

                cc = 100 * i * k

            if k == count_max:

                cc = 100 * i * k + bonus

                

            if j - k >= 0:

                dp[j] = max(dp[j],dp[j-k] + cc)

                

for i,j in enumerate(dp):

    if g <= j:

        print(i)

        break
d,g = list(map(int, input().split()))

P = []

C = []

PC = []

for i in range(d):

    p,c = list(map(int, input().split()))

    P.append(p)

    C.append(c)

    PC.append((p,c))

    

P_sum = sum(P)

dp = [0 for i in range(P_sum + 1)]

for i,j in enumerate(PC):

    for k in range(P_sum,  -1, -1):

        for l in range(1,j[0]+1):

            if l + k <= P_sum:

                if l == j[0]:

                    cc = 100 * (i + 1)* l + j[1]

                else:

                    cc = 100 * (i + 1) * l

                dp[l + k] = max(dp[l + k ], dp[k] + cc)

                

for i,j in enumerate(dp):

    if j >= g:

        print(i)

        break
d, g = list(map(int, input().split()))
p = []
c = []
for i in range(d):
    a, b = list(map(int, input().split()))
    p.append(a)
    c.append(b)
dp = [0 for i in range(sum(p) + 2)]
for i in range(1, d + 1):
    count_max = p[i - 1]
    bonus = c[i - 1]
    for j in range(sum(p) + 1, 0, -1):
        for k in range(1, count_max + 1):
            if k < count_max:
                cc = 100 * i * k
            if k == count_max:
                cc = 100 * i * k + bonus
            if j - k >= 0:
                dp[j] = max(dp[j], dp[j - k] + cc)
for i, j in enumerate(dp):
    if g <= j:
        print(i)
        break

d, g = list(map(int, input().split()))
P = []
C = []
PC = []
for i in range(d):
    p, c = list(map(int, input().split()))
    P.append(p)
    C.append(c)
    PC.append((p, c))
P_sum = sum(P)
dp = [0 for i in range(P_sum + 1)]
for i, j in enumerate(PC):
    for k in range(P_sum, -1, -1):
        for l in range(1, j[0] + 1):
            if l + k <= P_sum:
                if l == j[0]:
                    cc = 100 * (i + 1) * l + j[1]
                else:
                    cc = 100 * (i + 1) * l
                dp[l + k] = max(dp[l + k], dp[k] + cc)
for i, j in enumerate(dp):
    if j >= g:
        print(i)
        break

-p = [] -c = [] +P = [] +C = [] +PC = [] -    a, b = list(map(int, input().split())) -    p.append(a) -    c.append(b) -dp = [0 for i in range(sum(p) + 2)] -for i in range(1, d + 1): -    count_max = p[i - 1] -    bonus = c[i - 1] -    for j in range(sum(p) + 1, 0, -1): -        for k in range(1, count_max + 1): -            if k < count_max: -                cc = 100 * i * k -            if k == count_max: -                cc = 100 * i * k + bonus -            if j - k >= 0: -                dp[j] = max(dp[j], dp[j - k] + cc) +    p, c = list(map(int, input().split())) +    P.append(p) +    C.append(c) +    PC.append((p, c)) +P_sum = sum(P) +dp = [0 for i in range(P_sum + 1)] +for i, j in enumerate(PC): +    for k in range(P_sum, -1, -1): +        for l in range(1, j[0] + 1): +            if l + k <= P_sum: +                if l == j[0]: +                    cc = 100 * (i + 1) * l + j[1] +                else: +                    cc = 100 * (i + 1) * l +                dp[l + k] = max(dp[l + k], dp[k] + cc) -    if g <= j: +    if j >= g: