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

p=[list(map(int, input().split())) for i in range(d)]

x=[]

for i in range(2**d):

    t=0

    u=0

    v=[]

    for k in range(d):

        v.append(k)

    for j in range(d):

        if ((i>>j)&1):

            t+=p[j][0]*100*(j+1)+p[j][1]

            u+=p[j][0]

            v[j]=0

    if t>=g:

        x.append(u)

    else:

        for l in range(p[max(v)][0]):

            if t+(max(v)+1)* 100*l<g<=t+(max(v)+1)* 100*(l+1):

                x.append(u+l+1)

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

x = [list(map(int, input().split())) for i in range(d)]

ans2=float('inf')



for i in range(2**d):

    v=[0]*d

    ans=0

    ans1=0

    for j in range(d):

        if (i>>j)&1==1:

            ans+=(x[j][0]*100*(j+1))+x[j][1]

            ans1+=x[j][0]

            v[j]=1





    if ans<g:

        for k in range(d):

            if v[d-k-1]==0:

                if g-ans<=(x[d-k-1][0]-1)*100*(d-k):

                    w=-(-(g-ans)//(100*(d-k)))



                    ans2=min(ans2,ans1+w)

                else:

                    break

    else:

        ans2=min(ans2,ans1)

print(ans2)
d, g = list(map(int, input().split()))
p = [list(map(int, input().split())) for i in range(d)]
x = []
for i in range(2**d):
    t = 0
    u = 0
    v = []
    for k in range(d):
        v.append(k)
    for j in range(d):
        if (i >> j) & 1:
            t += p[j][0] * 100 * (j + 1) + p[j][1]
            u += p[j][0]
            v[j] = 0
    if t >= g:
        x.append(u)
    else:
        for l in range(p[max(v)][0]):
            if t + (max(v) + 1) * 100 * l < g <= t + (max(v) + 1) * 100 * (l + 1):
                x.append(u + l + 1)
print((min(x)))

d, g = list(map(int, input().split()))
x = [list(map(int, input().split())) for i in range(d)]
ans2 = float("inf")
for i in range(2**d):
    v = [0] * d
    ans = 0
    ans1 = 0
    for j in range(d):
        if (i >> j) & 1 == 1:
            ans += (x[j][0] * 100 * (j + 1)) + x[j][1]
            ans1 += x[j][0]
            v[j] = 1
    if ans < g:
        for k in range(d):
            if v[d - k - 1] == 0:
                if g - ans <= (x[d - k - 1][0] - 1) * 100 * (d - k):
                    w = -(-(g - ans) // (100 * (d - k)))
                    ans2 = min(ans2, ans1 + w)
                else:
                    break
    else:
        ans2 = min(ans2, ans1)
print(ans2)

-p = [list(map(int, input().split())) for i in range(d)] -x = [] +x = [list(map(int, input().split())) for i in range(d)] +ans2 = float("inf") -    t = 0 -    u = 0 -    v = [] -    for k in range(d): -        v.append(k) +    v = [0] * d +    ans = 0 +    ans1 = 0 -        if (i >> j) & 1: -            t += p[j][0] * 100 * (j + 1) + p[j][1] -            u += p[j][0] -            v[j] = 0 -    if t >= g: -        x.append(u) +        if (i >> j) & 1 == 1: +            ans += (x[j][0] * 100 * (j + 1)) + x[j][1] +            ans1 += x[j][0] +            v[j] = 1 +    if ans < g: +        for k in range(d): +            if v[d - k - 1] == 0: +                if g - ans <= (x[d - k - 1][0] - 1) * 100 * (d - k): +                    w = -(-(g - ans) // (100 * (d - k))) +                    ans2 = min(ans2, ans1 + w) +                else: +                    break -        for l in range(p[max(v)][0]): -            if t + (max(v) + 1) * 100 * l < g <= t + (max(v) + 1) * 100 * (l + 1): -                x.append(u + l + 1) -print((min(x))) +        ans2 = min(ans2, ans1) +print(ans2)