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

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



min_solved = 1000

for i in range(2 ** d):

    i_str = "{:010b}".format(i)[::-1]

    score = 0

    solved = 0

    for j in range(d):

        if i_str[j] == "1":

            score += 100 * (j + 1) * pc[j][0] + pc[j][1]

            solved += pc[j][0]

    if score < g:

        add_i = i_str[:d].rfind("0")

        for k in range(pc[add_i][0]):

            score += 100 * (add_i + 1)

            solved += 1

            if score >= g:

                break

        else:

            continue



    if solved < min_solved:

        min_solved = solved



print(min_solved)

from math import ceil

from itertools import product



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

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



ans = 1000

for pat in product(["1", "0"], repeat=d):

    score = 0

    cnt = 0

    not_complete = 0

    for i, bl in enumerate(pat):

        if bl == "1":

            score += 100 * (i + 1) * pc[i][0] + pc[i][1]

            cnt += pc[i][0]

        else:

            not_complete = i



    if score < g:

        add = ceil((g - score) / (100 * (not_complete + 1)))

        if add < pc[not_complete][0]:

            cnt += add

        else:

            continue



    ans = min(ans, cnt)



print(ans)

d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for _ in range(d)]
min_solved = 1000
for i in range(2**d):
    i_str = "{:010b}".format(i)[::-1]
    score = 0
    solved = 0
    for j in range(d):
        if i_str[j] == "1":
            score += 100 * (j + 1) * pc[j][0] + pc[j][1]
            solved += pc[j][0]
    if score < g:
        add_i = i_str[:d].rfind("0")
        for k in range(pc[add_i][0]):
            score += 100 * (add_i + 1)
            solved += 1
            if score >= g:
                break
        else:
            continue
    if solved < min_solved:
        min_solved = solved
print(min_solved)

from math import ceil
from itertools import product

d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for _ in range(d)]
ans = 1000
for pat in product(["1", "0"], repeat=d):
    score = 0
    cnt = 0
    not_complete = 0
    for i, bl in enumerate(pat):
        if bl == "1":
            score += 100 * (i + 1) * pc[i][0] + pc[i][1]
            cnt += pc[i][0]
        else:
            not_complete = i
    if score < g:
        add = ceil((g - score) / (100 * (not_complete + 1)))
        if add < pc[not_complete][0]:
            cnt += add
        else:
            continue
    ans = min(ans, cnt)
print(ans)

+from math import ceil +from itertools import product + -min_solved = 1000 -for i in range(2**d): -    i_str = "{:010b}".format(i)[::-1] +ans = 1000 +for pat in product(["1", "0"], repeat=d): -    solved = 0 -    for j in range(d): -        if i_str[j] == "1": -            score += 100 * (j + 1) * pc[j][0] + pc[j][1] -            solved += pc[j][0] +    cnt = 0 +    not_complete = 0 +    for i, bl in enumerate(pat): +        if bl == "1": +            score += 100 * (i + 1) * pc[i][0] + pc[i][1] +            cnt += pc[i][0] +        else: +            not_complete = i -        add_i = i_str[:d].rfind("0") -        for k in range(pc[add_i][0]): -            score += 100 * (add_i + 1) -            solved += 1 -            if score >= g: -                break +        add = ceil((g - score) / (100 * (not_complete + 1))) +        if add < pc[not_complete][0]: +            cnt += add -    if solved < min_solved: -        min_solved = solved -print(min_solved) +    ans = min(ans, cnt) +print(ans)