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

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

G /= 100

C = 2e3

N = len(pc)

for i in range(2 ** N):

    p = 0

    c = 0

    for j in range(N):

        if i >> j & 1:

            p += pc[j][0] * (j + 1) + pc[j][1] / 100

            c += pc[j][0]

    if p >= G:

        C = min(c, C)

        continue

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

        if not i >> j & 1:

            for k in range(pc[j][0] - 1):

                p += j + 1

                c += 1

                if p >= G:

                    break

        if p >= G:

            break

    if p >= G:

        C = min(c, C)

        continue



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

G = int(G / 100)

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



N = 10 ** 9

for bit in range(2 ** D):

    S = 0

    c = 0

    A = True

    a = -1

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

        if bit & (1 << i):

            S += (i + 1) * pc[i][0] + int(pc[i][1] / 100)

            c += pc[i][0]

        elif A:

            a = i

            A = False

    if a != -1:

        for i in range(1, pc[a][0]):

            if S >= G:

                break

            S += a + 1

            c += 1

    if S >= G:

        N = min(N, c)



print(N)
D, G = list(map(int, input().split()))
pc = [list(map(int, input().split())) for i in range(D)]
G /= 100
C = 2e3
N = len(pc)
for i in range(2**N):
    p = 0
    c = 0
    for j in range(N):
        if i >> j & 1:
            p += pc[j][0] * (j + 1) + pc[j][1] / 100
            c += pc[j][0]
    if p >= G:
        C = min(c, C)
        continue
    for j in range(N - 1, -1, -1):
        if not i >> j & 1:
            for k in range(pc[j][0] - 1):
                p += j + 1
                c += 1
                if p >= G:
                    break
        if p >= G:
            break
    if p >= G:
        C = min(c, C)
        continue
print(C)

D, G = list(map(int, input().split()))
G = int(G / 100)
pc = [list(map(int, input().split())) for _ in range(D)]
N = 10**9
for bit in range(2**D):
    S = 0
    c = 0
    A = True
    a = -1
    for i in range(D - 1, -1, -1):
        if bit & (1 << i):
            S += (i + 1) * pc[i][0] + int(pc[i][1] / 100)
            c += pc[i][0]
        elif A:
            a = i
            A = False
    if a != -1:
        for i in range(1, pc[a][0]):
            if S >= G:
                break
            S += a + 1
            c += 1
    if S >= G:
        N = min(N, c)
print(N)

-pc = [list(map(int, input().split())) for i in range(D)] -G /= 100 -C = 2e3 -N = len(pc) -for i in range(2**N): -    p = 0 +G = int(G / 100) +pc = [list(map(int, input().split())) for _ in range(D)] +N = 10**9 +for bit in range(2**D): +    S = 0 -    for j in range(N): -        if i >> j & 1: -            p += pc[j][0] * (j + 1) + pc[j][1] / 100 -            c += pc[j][0] -    if p >= G: -        C = min(c, C) -        continue -    for j in range(N - 1, -1, -1): -        if not i >> j & 1: -            for k in range(pc[j][0] - 1): -                p += j + 1 -                c += 1 -                if p >= G: -                    break -        if p >= G: -            break -    if p >= G: -        C = min(c, C) -        continue -print(C) +    A = True +    a = -1 +    for i in range(D - 1, -1, -1): +        if bit & (1 << i): +            S += (i + 1) * pc[i][0] + int(pc[i][1] / 100) +            c += pc[i][0] +        elif A: +            a = i +            A = False +    if a != -1: +        for i in range(1, pc[a][0]): +            if S >= G: +                break +            S += a + 1 +            c += 1 +    if S >= G: +        N = min(N, c) +print(N)