def main():

    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 i in range(1 << D):

        cnt = 0

        score = 0

        tmp = 0

        for j in range(D):

            if (i >> j) & 1:

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

                cnt += p[j]

            else:

                tmp = j

                

        if score < G:

            for k in range(1,p[tmp]):

                score += 100 * (tmp + 1)

                cnt += 1

                if score >= G:

                    break

        

        if score >= G:

            ans = min(ans,cnt)

    

    print(ans)





main()
from collections import defaultdict



def main():

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

    problem = []

    for _ in range(D):

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

        problem.append([p,c])

    ans = float('inf')

    for i in range(2**D):

        all_solve = []

        others = []

        score = 0

        cnt = 0

        for j in range(D):

            if (i >> j) & 1:

                all_solve.append(j)

                cnt += problem[j][0]

                score += 100 * (j+1) * problem[j][0] + problem[j][1]

            else:

                others.append(j)

        if score >= G:

            ans = min(cnt,ans)

            continue



        others.sort(reverse=True)

        for k in others:

            for m in range(problem[k][0]):

                score += 100*(k+1)

                cnt += 1

                if score >= G:

                    ans = min(ans, cnt)

                    break

            else:

                score += problem[k][1]

                if score >= G:

                    ans = min(ans, cnt)

            if score >= G:

                break

        

        if score >= G:

            ans = min(ans, cnt)



        

    print(ans)    



if __name__ == "__main__":

    main()
def main():
    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 i in range(1 << D):
        cnt = 0
        score = 0
        tmp = 0
        for j in range(D):
            if (i >> j) & 1:
                score += c[j] + 100 * (j + 1) * p[j]
                cnt += p[j]
            else:
                tmp = j
        if score < G:
            for k in range(1, p[tmp]):
                score += 100 * (tmp + 1)
                cnt += 1
                if score >= G:
                    break
        if score >= G:
            ans = min(ans, cnt)
    print(ans)


main()

from collections import defaultdict


def main():
    D, G = list(map(int, input().split()))
    problem = []
    for _ in range(D):
        p, c = list(map(int, input().split()))
        problem.append([p, c])
    ans = float("inf")
    for i in range(2**D):
        all_solve = []
        others = []
        score = 0
        cnt = 0
        for j in range(D):
            if (i >> j) & 1:
                all_solve.append(j)
                cnt += problem[j][0]
                score += 100 * (j + 1) * problem[j][0] + problem[j][1]
            else:
                others.append(j)
        if score >= G:
            ans = min(cnt, ans)
            continue
        others.sort(reverse=True)
        for k in others:
            for m in range(problem[k][0]):
                score += 100 * (k + 1)
                cnt += 1
                if score >= G:
                    ans = min(ans, cnt)
                    break
            else:
                score += problem[k][1]
                if score >= G:
                    ans = min(ans, cnt)
            if score >= G:
                break
        if score >= G:
            ans = min(ans, cnt)
    print(ans)


if __name__ == "__main__":
    main()

+from collections import defaultdict + + -    p = [0] * D -    c = [0] * D -    for i in range(D): -        p[i], c[i] = list(map(int, input().split())) +    problem = [] +    for _ in range(D): +        p, c = list(map(int, input().split())) +        problem.append([p, c]) -    for i in range(1 << D): +    for i in range(2**D): +        all_solve = [] +        others = [] +        score = 0 -        score = 0 -        tmp = 0 -                score += c[j] + 100 * (j + 1) * p[j] -                cnt += p[j] +                all_solve.append(j) +                cnt += problem[j][0] +                score += 100 * (j + 1) * problem[j][0] + problem[j][1] -                tmp = j -        if score < G: -            for k in range(1, p[tmp]): -                score += 100 * (tmp + 1) +                others.append(j) +        if score >= G: +            ans = min(cnt, ans) +            continue +        others.sort(reverse=True) +        for k in others: +            for m in range(problem[k][0]): +                score += 100 * (k + 1) +                    ans = min(ans, cnt) +            else: +                score += problem[k][1] +                if score >= G: +                    ans = min(ans, cnt) +            if score >= G: +                break -main() +if __name__ == "__main__": +    main()