dp = [[0 for n in range(1001)] for m in range(11)]

length, goal = list(map(int, input().split(" ")))

problems = []

for l in range(length):

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

    problems.append([a, b])



for i in range(length):

    max_problems = problems[i][0]

            

    for k in range(1000):

        if dp[i][k]:

            for l in range(max_problems):

                dp[i + 1][k + 1 + l] = max(dp[i + 1][k + 1 + l], dp[i][k] + (i + 1) * 100 * (l + 1) + (problems[i][1] * int(l + 1 == max_problems)) )

                dp[i + 1][k] = max(dp[i + 1][k], dp[i][k])

    for l in range(max_problems):

        dp[i + 1][1 + l] = max(dp[i + 1][1 + l], (i + 1) * 100 * (l + 1) + (problems[i][1] * int(l + 1 == max_problems)) )

        # print(dp[i + 1][1])

answer = float("inf")

for i in range(11):

    for j in range(1001):

        if dp[i][j] >= goal:

            answer = min(answer, j)

print(answer)
import math

length, goal = list(map(int, input().split(" ")))

nums = []

sumall = []

for i in range(length):

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

    nums.append(a)

    sumall.append(a * (i + 1) * 100 + b)

answer = float("inf")

for bit in range(2 ** length):

    temp = []

    for i in range(length - 1, -1, -1):

        if bit & (1 << i):

            temp.append(i)

    temp_length = len(temp)

    for tempbit in range(2 ** temp_length):

        temp_sum = 0

        choosed = 0

        for i in range(temp_length):

            if tempbit & (1 << i):

                temp_sum += sumall[temp[i]]

                choosed += nums[temp[i]]

                if temp_sum >= goal:

                    answer = min(answer, choosed)

                    break

            else:

                if temp_sum + (nums[temp[i]] - 1) * (temp[i] + 1) * 100 >= goal:

                    answer = min(answer, choosed + int(math.ceil((goal - temp_sum) / (100 * (temp[i] + 1)))) )

                    break

                temp_sum += (nums[temp[i]] - 1) * (temp[i] + 1) * 100

                choosed += nums[temp[i]] - 1

        # print(bin(bit), bin(tempbit), temp_sum, choosed, answer)

    # print(answer, bin(bit))

print(answer)

dp = [[0 for n in range(1001)] for m in range(11)]
length, goal = list(map(int, input().split(" ")))
problems = []
for l in range(length):
    a, b = list(map(int, input().split(" ")))
    problems.append([a, b])
for i in range(length):
    max_problems = problems[i][0]
    for k in range(1000):
        if dp[i][k]:
            for l in range(max_problems):
                dp[i + 1][k + 1 + l] = max(
                    dp[i + 1][k + 1 + l],
                    dp[i][k]
                    + (i + 1) * 100 * (l + 1)
                    + (problems[i][1] * int(l + 1 == max_problems)),
                )
                dp[i + 1][k] = max(dp[i + 1][k], dp[i][k])
    for l in range(max_problems):
        dp[i + 1][1 + l] = max(
            dp[i + 1][1 + l],
            (i + 1) * 100 * (l + 1) + (problems[i][1] * int(l + 1 == max_problems)),
        )
        # print(dp[i + 1][1])
answer = float("inf")
for i in range(11):
    for j in range(1001):
        if dp[i][j] >= goal:
            answer = min(answer, j)
print(answer)

import math

length, goal = list(map(int, input().split(" ")))
nums = []
sumall = []
for i in range(length):
    a, b = list(map(int, input().split(" ")))
    nums.append(a)
    sumall.append(a * (i + 1) * 100 + b)
answer = float("inf")
for bit in range(2**length):
    temp = []
    for i in range(length - 1, -1, -1):
        if bit & (1 << i):
            temp.append(i)
    temp_length = len(temp)
    for tempbit in range(2**temp_length):
        temp_sum = 0
        choosed = 0
        for i in range(temp_length):
            if tempbit & (1 << i):
                temp_sum += sumall[temp[i]]
                choosed += nums[temp[i]]
                if temp_sum >= goal:
                    answer = min(answer, choosed)
                    break
            else:
                if temp_sum + (nums[temp[i]] - 1) * (temp[i] + 1) * 100 >= goal:
                    answer = min(
                        answer,
                        choosed
                        + int(math.ceil((goal - temp_sum) / (100 * (temp[i] + 1)))),
                    )
                    break
                temp_sum += (nums[temp[i]] - 1) * (temp[i] + 1) * 100
                choosed += nums[temp[i]] - 1
        # print(bin(bit), bin(tempbit), temp_sum, choosed, answer)
    # print(answer, bin(bit))
print(answer)

-dp = [[0 for n in range(1001)] for m in range(11)] +import math + -problems = [] -for l in range(length): +nums = [] +sumall = [] +for i in range(length): -    problems.append([a, b]) -for i in range(length): -    max_problems = problems[i][0] -    for k in range(1000): -        if dp[i][k]: -            for l in range(max_problems): -                dp[i + 1][k + 1 + l] = max( -                    dp[i + 1][k + 1 + l], -                    dp[i][k] -                    + (i + 1) * 100 * (l + 1) -                    + (problems[i][1] * int(l + 1 == max_problems)), -                ) -                dp[i + 1][k] = max(dp[i + 1][k], dp[i][k]) -    for l in range(max_problems): -        dp[i + 1][1 + l] = max( -            dp[i + 1][1 + l], -            (i + 1) * 100 * (l + 1) + (problems[i][1] * int(l + 1 == max_problems)), -        ) -        # print(dp[i + 1][1]) +    nums.append(a) +    sumall.append(a * (i + 1) * 100 + b) -for i in range(11): -    for j in range(1001): -        if dp[i][j] >= goal: -            answer = min(answer, j) +for bit in range(2**length): +    temp = [] +    for i in range(length - 1, -1, -1): +        if bit & (1 << i): +            temp.append(i) +    temp_length = len(temp) +    for tempbit in range(2**temp_length): +        temp_sum = 0 +        choosed = 0 +        for i in range(temp_length): +            if tempbit & (1 << i): +                temp_sum += sumall[temp[i]] +                choosed += nums[temp[i]] +                if temp_sum >= goal: +                    answer = min(answer, choosed) +                    break +            else: +                if temp_sum + (nums[temp[i]] - 1) * (temp[i] + 1) * 100 >= goal: +                    answer = min( +                        answer, +                        choosed +                        + int(math.ceil((goal - temp_sum) / (100 * (temp[i] + 1)))), +                    ) +                    break +                temp_sum += (nums[temp[i]] - 1) * (temp[i] + 1) * 100 +                choosed += nums[temp[i]] - 1 +        # print(bin(bit), bin(tempbit), temp_sum, choosed, answer) +    # print(answer, bin(bit))