

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

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



min_count = 10**18

for i in range(1<<D):

    # print(bin(i)[2:])

    count = 0

    point = 0

    top_zero = None

    for j, (p, c) in enumerate(PC):

        if (i>>j)%2:

            count += p

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

        else:

            top_zero = j

    if top_zero != None:

        for j in range(PC[top_zero][0]-1):

            # print(j, top_zero, point)

            if point >= G:

                break

            point += 100*(top_zero+1)

            count += 1

    # print("count:", count)

    if point >= G:

        min_count = min(min_count, count)



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

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



p, c = list(zip(*PC))



min_count = 10**18

for i in range(1<<D):

    h = -1

    point = 0

    count = 0

    for j in range(D):

        if (i>>j)%2:

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

            count += p[j]

        else:

            h = j

    if h > -1 and G > point:

        x = -(-(G-point)//(100*(h+1)))

        if x > p[h]:

            continue

        count += x

    min_count = min(min_count, count)



print(min_count)
D, G = list(map(int, input().split(" ")))
PC = [list(map(int, input().split(" "))) for _ in range(D)]
min_count = 10**18
for i in range(1 << D):
    # print(bin(i)[2:])
    count = 0
    point = 0
    top_zero = None
    for j, (p, c) in enumerate(PC):
        if (i >> j) % 2:
            count += p
            point += 100 * (j + 1) * p + c
        else:
            top_zero = j
    if top_zero != None:
        for j in range(PC[top_zero][0] - 1):
            # print(j, top_zero, point)
            if point >= G:
                break
            point += 100 * (top_zero + 1)
            count += 1
    # print("count:", count)
    if point >= G:
        min_count = min(min_count, count)
print(min_count)

D, G = list(map(int, input().split()))
PC = [list(map(int, input().split())) for _ in range(D)]
p, c = list(zip(*PC))
min_count = 10**18
for i in range(1 << D):
    h = -1
    point = 0
    count = 0
    for j in range(D):
        if (i >> j) % 2:
            point += 100 * (j + 1) * p[j] + c[j]
            count += p[j]
        else:
            h = j
    if h > -1 and G > point:
        x = -(-(G - point) // (100 * (h + 1)))
        if x > p[h]:
            continue
        count += x
    min_count = min(min_count, count)
print(min_count)

-D, G = list(map(int, input().split(" "))) -PC = [list(map(int, input().split(" "))) for _ in range(D)] +D, G = list(map(int, input().split())) +PC = [list(map(int, input().split())) for _ in range(D)] +p, c = list(zip(*PC)) -    # print(bin(i)[2:]) +    h = -1 +    point = 0 -    point = 0 -    top_zero = None -    for j, (p, c) in enumerate(PC): +    for j in range(D): -            count += p -            point += 100 * (j + 1) * p + c +            point += 100 * (j + 1) * p[j] + c[j] +            count += p[j] -            top_zero = j -    if top_zero != None: -        for j in range(PC[top_zero][0] - 1): -            # print(j, top_zero, point) -            if point >= G: -                break -            point += 100 * (top_zero + 1) -            count += 1 -    # print("count:", count) -    if point >= G: -        min_count = min(min_count, count) +            h = j +    if h > -1 and G > point: +        x = -(-(G - point) // (100 * (h + 1))) +        if x > p[h]: +            continue +        count += x +    min_count = min(min_count, count)