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

table = []

for i in range(D):

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

    table.append((i+1,p,c))

ans = 10**3

for i in range(1<<D):

    count = 0

    score = 0

    remain = []

    for j in range(D):

        d,p,c = table[j]

        if i & (1<<j):

            score += 100*(d)*p+c

            count += p

        else:

            remain.append((d,p,c))

    if score < G:

        remain.sort(reverse=True)

        d,p,c = remain[0]

        while score < G and p > 0:

            score += 100*d

            count += 1

            p -= 1

    if score >= G:

        ans = min(ans,count)

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

table = []

ans = 0



for i in range(D):

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

    ans += p

    table.append((p,c))





for i in range(2**D):

    score = 0

    n = 0

    solved = [0] * D

    for j in range(D):

        if i>>j & 1:

            p,c = table[j]

            solved[j] = 1

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

            n += p

    if score<G:

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

            if solved[k] == 0:

                p = table[k][0]

                for l in range(1,p):

                    score += 100*(k+1)

                    n += 1

                    if score>=G:

                        break

                break



    if score>=G:

        ans = min(n,ans)

print(ans)
D, G = list(map(int, input().split()))
table = []
for i in range(D):
    p, c = list(map(int, input().split()))
    table.append((i + 1, p, c))
ans = 10**3
for i in range(1 << D):
    count = 0
    score = 0
    remain = []
    for j in range(D):
        d, p, c = table[j]
        if i & (1 << j):
            score += 100 * (d) * p + c
            count += p
        else:
            remain.append((d, p, c))
    if score < G:
        remain.sort(reverse=True)
        d, p, c = remain[0]
        while score < G and p > 0:
            score += 100 * d
            count += 1
            p -= 1
    if score >= G:
        ans = min(ans, count)
print(ans)

D, G = list(map(int, input().split()))
table = []
ans = 0
for i in range(D):
    p, c = list(map(int, input().split()))
    ans += p
    table.append((p, c))
for i in range(2**D):
    score = 0
    n = 0
    solved = [0] * D
    for j in range(D):
        if i >> j & 1:
            p, c = table[j]
            solved[j] = 1
            score += 100 * (j + 1) * p + c
            n += p
    if score < G:
        for k in range(D - 1, -1, -1):
            if solved[k] == 0:
                p = table[k][0]
                for l in range(1, p):
                    score += 100 * (k + 1)
                    n += 1
                    if score >= G:
                        break
                break
    if score >= G:
        ans = min(n, ans)
print(ans)

+ans = 0 -    table.append((i + 1, p, c)) -ans = 10**3 -for i in range(1 << D): -    count = 0 +    ans += p +    table.append((p, c)) +for i in range(2**D): -    remain = [] +    n = 0 +    solved = [0] * D -        d, p, c = table[j] -        if i & (1 << j): -            score += 100 * (d) * p + c -            count += p -        else: -            remain.append((d, p, c)) +        if i >> j & 1: +            p, c = table[j] +            solved[j] = 1 +            score += 100 * (j + 1) * p + c +            n += p -        remain.sort(reverse=True) -        d, p, c = remain[0] -        while score < G and p > 0: -            score += 100 * d -            count += 1 -            p -= 1 +        for k in range(D - 1, -1, -1): +            if solved[k] == 0: +                p = table[k][0] +                for l in range(1, p): +                    score += 100 * (k + 1) +                    n += 1 +                    if score >= G: +                        break +                break -        ans = min(ans, count) +        ans = min(n, ans)