D , G = list(map(int,input().split()))

questions = []

for i in range(D):

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

    questions.append([p,c])



ans = float("inf")

for bit in range(2 ** D):

    tmp_ans = 0

    tmp_sum = 0

    for j in range(D):

        if bit >> j & 1:

            tmp_sum += questions[j][0] * 100 * (j + 1) + questions[j][1]

            tmp_ans += questions[j][0]

    if tmp_sum < G:

        for j in range(D - 1 , -1 , -1):

            if bit >> j & 1:

                continue

            else:

                for k in range(questions[j][0]):

                    tmp_ans += 1

                    tmp_sum += 100 * (j + 1)

                    if tmp_sum >= G:

                        break

                if tmp_sum >= G:

                    break

    if tmp_ans < ans and tmp_sum >= G:

        ans = tmp_ans

print(ans)
D , G = list(map(int,input().split()))

bonus = []

question_cnt = []

for i in range(D):

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

    question_cnt.append(p)

    bonus.append(c)

ans = float('inf')

for bit in range(2 ** D):

    sum_val = 0

    tmp_ans = 0

    Flag = False

    for j in range(D):

        if bit >> j & 1:

            sum_val += question_cnt[j] * (j + 1) * 100 + bonus[j]

            tmp_ans += question_cnt[j]

    if sum_val < G:

        for j in range(D-1 , - 1 , -1):

            if Flag:

                break

            if not bit >> j & 1:

                Flag = True

                for k in range(question_cnt[j]):

                    sum_val += (j + 1) * 100

                    tmp_ans += 1

                    if sum_val >= G:

                        break

    if tmp_ans < ans and sum_val >= G:

        ans = tmp_ans

print(ans)

D, G = list(map(int, input().split()))
questions = []
for i in range(D):
    p, c = list(map(int, input().split()))
    questions.append([p, c])
ans = float("inf")
for bit in range(2**D):
    tmp_ans = 0
    tmp_sum = 0
    for j in range(D):
        if bit >> j & 1:
            tmp_sum += questions[j][0] * 100 * (j + 1) + questions[j][1]
            tmp_ans += questions[j][0]
    if tmp_sum < G:
        for j in range(D - 1, -1, -1):
            if bit >> j & 1:
                continue
            else:
                for k in range(questions[j][0]):
                    tmp_ans += 1
                    tmp_sum += 100 * (j + 1)
                    if tmp_sum >= G:
                        break
                if tmp_sum >= G:
                    break
    if tmp_ans < ans and tmp_sum >= G:
        ans = tmp_ans
print(ans)

D, G = list(map(int, input().split()))
bonus = []
question_cnt = []
for i in range(D):
    p, c = list(map(int, input().split()))
    question_cnt.append(p)
    bonus.append(c)
ans = float("inf")
for bit in range(2**D):
    sum_val = 0
    tmp_ans = 0
    Flag = False
    for j in range(D):
        if bit >> j & 1:
            sum_val += question_cnt[j] * (j + 1) * 100 + bonus[j]
            tmp_ans += question_cnt[j]
    if sum_val < G:
        for j in range(D - 1, -1, -1):
            if Flag:
                break
            if not bit >> j & 1:
                Flag = True
                for k in range(question_cnt[j]):
                    sum_val += (j + 1) * 100
                    tmp_ans += 1
                    if sum_val >= G:
                        break
    if tmp_ans < ans and sum_val >= G:
        ans = tmp_ans
print(ans)

-questions = [] +bonus = [] +question_cnt = [] -    questions.append([p, c]) +    question_cnt.append(p) +    bonus.append(c) +    sum_val = 0 -    tmp_sum = 0 +    Flag = False -            tmp_sum += questions[j][0] * 100 * (j + 1) + questions[j][1] -            tmp_ans += questions[j][0] -    if tmp_sum < G: +            sum_val += question_cnt[j] * (j + 1) * 100 + bonus[j] +            tmp_ans += question_cnt[j] +    if sum_val < G: -            if bit >> j & 1: -                continue -            else: -                for k in range(questions[j][0]): +            if Flag: +                break +            if not bit >> j & 1: +                Flag = True +                for k in range(question_cnt[j]): +                    sum_val += (j + 1) * 100 -                    tmp_sum += 100 * (j + 1) -                    if tmp_sum >= G: +                    if sum_val >= G: -                if tmp_sum >= G: -                    break -    if tmp_ans < ans and tmp_sum >= G: +    if tmp_ans < ans and sum_val >= G: