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

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

s = set(range(d))

ans = float("Inf")

x = []

for i in zip(*a):

    x.append(list(i))

c = []

for i in range(2**d):

    b = []

    for j in range(d):

        if i>>j & 1:

            b.append(j)

    c.append(b)

for i in c:

    d = 0

    count = 0

    for j in i:

        d += (100*(j+1)) * a[j][0] + a[j][1]

        count += a[j][0]

    if d < g:

        for x in sorted(s - set(i),reverse=True):

            for y in range(a[x][0]):

                if d >= g:

                    break

                d += 100*(x+1)

                count += 1

    if d < g:continue

    ans = min(ans,count)

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

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

s = set(i for i in range(d))

ans = float("Inf")

for i in range(2**d):

    a = []

    total,count = 0,0

    for j in range(d):

        if i >> j & 1:

            a.append(j)

    for x in a:

        total += 100*(x+1)*ary[x][0]+ary[x][1]

        count += ary[x][0]

    if total >= g:

        ans = min(ans,count)

        continue

    for y in sorted(s - set(a),reverse=True):

        if total + 100*(y+1)*(ary[y][0]-1) >= g:

            count += -(-(g-total) // (100*(y+1)))

            ans = min(ans,count)

            break

        total += 100*(y+1)*(ary[y][0]-1)

        count += ary[y][0]-1

    if total >= g:

        ans = min(ans,count)

print(ans)
d, g = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(d)]
s = set(range(d))
ans = float("Inf")
x = []
for i in zip(*a):
    x.append(list(i))
c = []
for i in range(2**d):
    b = []
    for j in range(d):
        if i >> j & 1:
            b.append(j)
    c.append(b)
for i in c:
    d = 0
    count = 0
    for j in i:
        d += (100 * (j + 1)) * a[j][0] + a[j][1]
        count += a[j][0]
    if d < g:
        for x in sorted(s - set(i), reverse=True):
            for y in range(a[x][0]):
                if d >= g:
                    break
                d += 100 * (x + 1)
                count += 1
    if d < g:
        continue
    ans = min(ans, count)
print(ans)

d, g = list(map(int, input().split()))
ary = [list(map(int, input().split())) for _ in range(d)]
s = set(i for i in range(d))
ans = float("Inf")
for i in range(2**d):
    a = []
    total, count = 0, 0
    for j in range(d):
        if i >> j & 1:
            a.append(j)
    for x in a:
        total += 100 * (x + 1) * ary[x][0] + ary[x][1]
        count += ary[x][0]
    if total >= g:
        ans = min(ans, count)
        continue
    for y in sorted(s - set(a), reverse=True):
        if total + 100 * (y + 1) * (ary[y][0] - 1) >= g:
            count += -(-(g - total) // (100 * (y + 1)))
            ans = min(ans, count)
            break
        total += 100 * (y + 1) * (ary[y][0] - 1)
        count += ary[y][0] - 1
    if total >= g:
        ans = min(ans, count)
print(ans)

-a = [list(map(int, input().split())) for _ in range(d)] -s = set(range(d)) +ary = [list(map(int, input().split())) for _ in range(d)] +s = set(i for i in range(d)) -x = [] -for i in zip(*a): -    x.append(list(i)) -c = [] -    b = [] +    a = [] +    total, count = 0, 0 -            b.append(j) -    c.append(b) -for i in c: -    d = 0 -    count = 0 -    for j in i: -        d += (100 * (j + 1)) * a[j][0] + a[j][1] -        count += a[j][0] -    if d < g: -        for x in sorted(s - set(i), reverse=True): -            for y in range(a[x][0]): -                if d >= g: -                    break -                d += 100 * (x + 1) -                count += 1 -    if d < g: +            a.append(j) +    for x in a: +        total += 100 * (x + 1) * ary[x][0] + ary[x][1] +        count += ary[x][0] +    if total >= g: +        ans = min(ans, count) -    ans = min(ans, count) +    for y in sorted(s - set(a), reverse=True): +        if total + 100 * (y + 1) * (ary[y][0] - 1) >= g: +            count += -(-(g - total) // (100 * (y + 1))) +            ans = min(ans, count) +            break +        total += 100 * (y + 1) * (ary[y][0] - 1) +        count += ary[y][0] - 1 +    if total >= g: +        ans = min(ans, count)