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

pc=[]

for _ in range(D):

    pc.append(list(map(int,input().strip().split())))



N=0

for i in range(D):

    N+=pc[i][0]



MIN_SUM=N

for n in range(2**D):

    score=0

    SUM=0

    for i in range(D):

        if (n>>i)&1==1:

            SUM+=pc[i][0]

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

    if score>=G:

        pass

    else:

        for j in reversed(list(range(D))):

            if (n>>j)&1==0:

                cnt=0

                while cnt<=pc[j][0]-2 and score<G:

                    score+=100*(j+1)

                    SUM+=1

                    cnt+=1

    if score>=G and SUM<=MIN_SUM:

        MIN_SUM=SUM



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

pc=[]

for _ in range(D):

    pc.append(list(map(int,input().strip().split())))

    

min_num=0

for i in range(D):

    min_num+=pc[i][0]



def dfs(l,D,G):

    global min_num

    score=0

    num=0

    if len(l)==D:

        for n in range(len(l)):

            if l[n]==1:

                score+=pc[n][0]*100*(n+1)+pc[n][1]

                num+=pc[n][0]

        if score>=G:

            min_num=min(min_num,num)

        else:

            for n in reversed(list(range(len(l)))):

                if l[n]==0:

                    i=0

                    while i<=pc[n][0]-1 and score<G:

                        score+=100*(n+1)

                        num+=1

                        i+=1

                    if score>=G:

                        break

            min_num=min(min_num,num)

        return

    else:

        for n in range(2):

            l.append(n)

            dfs(l,D,G)

            l.pop()

dfs([],D,G)

print(min_num)
D, G = list(map(int, input().strip().split()))
pc = []
for _ in range(D):
    pc.append(list(map(int, input().strip().split())))
N = 0
for i in range(D):
    N += pc[i][0]
MIN_SUM = N
for n in range(2**D):
    score = 0
    SUM = 0
    for i in range(D):
        if (n >> i) & 1 == 1:
            SUM += pc[i][0]
            score += 100 * (i + 1) * pc[i][0] + pc[i][1]
    if score >= G:
        pass
    else:
        for j in reversed(list(range(D))):
            if (n >> j) & 1 == 0:
                cnt = 0
                while cnt <= pc[j][0] - 2 and score < G:
                    score += 100 * (j + 1)
                    SUM += 1
                    cnt += 1
    if score >= G and SUM <= MIN_SUM:
        MIN_SUM = SUM
print(MIN_SUM)

D, G = list(map(int, input().strip().split()))
pc = []
for _ in range(D):
    pc.append(list(map(int, input().strip().split())))
min_num = 0
for i in range(D):
    min_num += pc[i][0]


def dfs(l, D, G):
    global min_num
    score = 0
    num = 0
    if len(l) == D:
        for n in range(len(l)):
            if l[n] == 1:
                score += pc[n][0] * 100 * (n + 1) + pc[n][1]
                num += pc[n][0]
        if score >= G:
            min_num = min(min_num, num)
        else:
            for n in reversed(list(range(len(l)))):
                if l[n] == 0:
                    i = 0
                    while i <= pc[n][0] - 1 and score < G:
                        score += 100 * (n + 1)
                        num += 1
                        i += 1
                    if score >= G:
                        break
            min_num = min(min_num, num)
        return
    else:
        for n in range(2):
            l.append(n)
            dfs(l, D, G)
            l.pop()


dfs([], D, G)
print(min_num)

-N = 0 +min_num = 0 -    N += pc[i][0] -MIN_SUM = N -for n in range(2**D): +    min_num += pc[i][0] + + +def dfs(l, D, G): +    global min_num -    SUM = 0 -    for i in range(D): -        if (n >> i) & 1 == 1: -            SUM += pc[i][0] -            score += 100 * (i + 1) * pc[i][0] + pc[i][1] -    if score >= G: -        pass +    num = 0 +    if len(l) == D: +        for n in range(len(l)): +            if l[n] == 1: +                score += pc[n][0] * 100 * (n + 1) + pc[n][1] +                num += pc[n][0] +        if score >= G: +            min_num = min(min_num, num) +        else: +            for n in reversed(list(range(len(l)))): +                if l[n] == 0: +                    i = 0 +                    while i <= pc[n][0] - 1 and score < G: +                        score += 100 * (n + 1) +                        num += 1 +                        i += 1 +                    if score >= G: +                        break +            min_num = min(min_num, num) +        return -        for j in reversed(list(range(D))): -            if (n >> j) & 1 == 0: -                cnt = 0 -                while cnt <= pc[j][0] - 2 and score < G: -                    score += 100 * (j + 1) -                    SUM += 1 -                    cnt += 1 -    if score >= G and SUM <= MIN_SUM: -        MIN_SUM = SUM -print(MIN_SUM) +        for n in range(2): +            l.append(n) +            dfs(l, D, G) +            l.pop() + + +dfs([], D, G) +print(min_num)