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

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



ans = float("inf")



for bit in range(1 << d):

    total = 0

    count = 0

    left = set(range(1, d+1))



    for i in range(d):

        if bit & (1 << i):

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

            count += pc[i][0]

            left.discard(i+1)

            #使ったものとして記憶



    if g > total:

        target = max(left)

        n = min(pc[target - 1][0], -(-(g - total) // (target * 100)))#切り上げ

        count += n

        total += n * target * 100

    #この下とはつながっていない



    if g <= total:

        ans = min(ans, count)



print(ans)
def dfs(i, total, count, left):

    global ans

    if i == d:

        if total < g:

            target = max(left)

            n = min(pc[target - 1][0], -(-(g - total) // (target * 100)))

            count += n

            total += n * target * 100



        if total >= g:

            ans = min(ans, count)



    else:

        dfs(i+1, total, count, left)

        dfs(i + 1, total + pc[i][0] * (i + 1) * 100 + pc[i][1], \

        count + pc[i][0], left - {i + 1})



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

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



ans = float("inf")



dfs(0,0,0,set(range(1,d+1)))

print(ans)
d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for i in range(d)]
ans = float("inf")
for bit in range(1 << d):
    total = 0
    count = 0
    left = set(range(1, d + 1))
    for i in range(d):
        if bit & (1 << i):
            total += pc[i][0] * 100 * (i + 1) + pc[i][1]
            count += pc[i][0]
            left.discard(i + 1)
            # 使ったものとして記憶
    if g > total:
        target = max(left)
        n = min(pc[target - 1][0], -(-(g - total) // (target * 100)))  # 切り上げ
        count += n
        total += n * target * 100
    # この下とはつながっていない
    if g <= total:
        ans = min(ans, count)
print(ans)

def dfs(i, total, count, left):
    global ans
    if i == d:
        if total < g:
            target = max(left)
            n = min(pc[target - 1][0], -(-(g - total) // (target * 100)))
            count += n
            total += n * target * 100
        if total >= g:
            ans = min(ans, count)
    else:
        dfs(i + 1, total, count, left)
        dfs(
            i + 1,
            total + pc[i][0] * (i + 1) * 100 + pc[i][1],
            count + pc[i][0],
            left - {i + 1},
        )


d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for i in range(d)]
ans = float("inf")
dfs(0, 0, 0, set(range(1, d + 1)))
print(ans)

+def dfs(i, total, count, left): +    global ans +    if i == d: +        if total < g: +            target = max(left) +            n = min(pc[target - 1][0], -(-(g - total) // (target * 100))) +            count += n +            total += n * target * 100 +        if total >= g: +            ans = min(ans, count) +    else: +        dfs(i + 1, total, count, left) +        dfs( +            i + 1, +            total + pc[i][0] * (i + 1) * 100 + pc[i][1], +            count + pc[i][0], +            left - {i + 1}, +        ) + + -for bit in range(1 << d): -    total = 0 -    count = 0 -    left = set(range(1, d + 1)) -    for i in range(d): -        if bit & (1 << i): -            total += pc[i][0] * 100 * (i + 1) + pc[i][1] -            count += pc[i][0] -            left.discard(i + 1) -            # 使ったものとして記憶 -    if g > total: -        target = max(left) -        n = min(pc[target - 1][0], -(-(g - total) // (target * 100)))  # 切り上げ -        count += n -        total += n * target * 100 -    # この下とはつながっていない -    if g <= total: -        ans = min(ans, count) +dfs(0, 0, 0, set(range(1, d + 1)))