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

p = [0] * D

c = [0] * D

for i in range(D):

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

ans = float('inf')

for bit in range(1 << D):

    score = 0

    cnt = 0

    l = [0] * D

    for j in range(D):

        if (bit >> j) & 1 == 1:

            score += p[j] * 100 * (j + 1) + c[j]

            cnt += p[j]

            l[j] = 1

    if score < G:

        idx = -1

        for k, v in enumerate(l):

            if v == 0:

                idx = k

        if idx != -1:

            p_copy = p.copy()

            while score < G and p_copy[idx] > 0:

                score += (idx + 1) * 100

                cnt += 1

                p_copy[idx] -= 1

    if score < G:

        continue

    ans = min(ans, cnt)

print(ans)

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

p = [0] * (D + 1)

c = [0] * (D + 1)

for i in range(1, D+1):

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

ans = float('inf')





def dfs(i, g):

    global ans

    if i == 0:

        return ans

    cnt = min(g // (100 * i), p[i])

    score = 100 * i * cnt

    if cnt == p[i]:

        score += c[i]

    if g > score:

        cnt += dfs(i - 1, g - score)

    return min(cnt, dfs(i - 1, g))





print((dfs(D, G)))
D, G = list(map(int, input().split()))
p = [0] * D
c = [0] * D
for i in range(D):
    p[i], c[i] = list(map(int, input().split()))
ans = float("inf")
for bit in range(1 << D):
    score = 0
    cnt = 0
    l = [0] * D
    for j in range(D):
        if (bit >> j) & 1 == 1:
            score += p[j] * 100 * (j + 1) + c[j]
            cnt += p[j]
            l[j] = 1
    if score < G:
        idx = -1
        for k, v in enumerate(l):
            if v == 0:
                idx = k
        if idx != -1:
            p_copy = p.copy()
            while score < G and p_copy[idx] > 0:
                score += (idx + 1) * 100
                cnt += 1
                p_copy[idx] -= 1
    if score < G:
        continue
    ans = min(ans, cnt)
print(ans)

D, G = list(map(int, input().split()))
p = [0] * (D + 1)
c = [0] * (D + 1)
for i in range(1, D + 1):
    p[i], c[i] = list(map(int, input().split()))
ans = float("inf")


def dfs(i, g):
    global ans
    if i == 0:
        return ans
    cnt = min(g // (100 * i), p[i])
    score = 100 * i * cnt
    if cnt == p[i]:
        score += c[i]
    if g > score:
        cnt += dfs(i - 1, g - score)
    return min(cnt, dfs(i - 1, g))


print((dfs(D, G)))

-p = [0] * D -c = [0] * D -for i in range(D): +p = [0] * (D + 1) +c = [0] * (D + 1) +for i in range(1, D + 1): -for bit in range(1 << D): -    score = 0 -    cnt = 0 -    l = [0] * D -    for j in range(D): -        if (bit >> j) & 1 == 1: -            score += p[j] * 100 * (j + 1) + c[j] -            cnt += p[j] -            l[j] = 1 -    if score < G: -        idx = -1 -        for k, v in enumerate(l): -            if v == 0: -                idx = k -        if idx != -1: -            p_copy = p.copy() -            while score < G and p_copy[idx] > 0: -                score += (idx + 1) * 100 -                cnt += 1 -                p_copy[idx] -= 1 -    if score < G: -        continue -    ans = min(ans, cnt) -print(ans) + + +def dfs(i, g): +    global ans +    if i == 0: +        return ans +    cnt = min(g // (100 * i), p[i]) +    score = 100 * i * cnt +    if cnt == p[i]: +        score += c[i] +    if g > score: +        cnt += dfs(i - 1, g - score) +    return min(cnt, dfs(i - 1, g)) + + +print((dfs(D, G)))