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

p = [0 for i in range(D)]

c = [0 for i in range(D)]

for i in range(D):

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



def dfs(s):

    if len(s) == D:

        ans = 1000

        score = 0

        times = 0

        for i in range(D):

            if s[i] == "1":

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

                times += p[i]

        if score >= G:

            ans = min(ans, times)

        else:

            idx = s.rfind("0")

            for i in range(1, p[idx]):

                if score + 100 * (idx+1) * i >= G:

                    ans = min(ans, times+i)

                    break

        return ans

    return min(dfs(s + "0"), dfs(s+ "1"))





print((dfs("")))
def main():

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

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



    ans = 100 * 10

    for bit in range(1<<D):

        score = 0

        num_problem = 0



        # complete bonus

        for i in range(D):

            if (bit>>i) & 1:

                base = 100 * (i+1)

                score += base * info[i][0] + info[i][1]

                num_problem += info[i][0]

        # other 

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

            if score >= G:

                break

            

            if not((bit>>i) & 1):

                base = 100 * (i+1)

                rest = G - score

                need = (rest + base - 1) // base



                if need > info[i][0] - 1:

                    score += base * (info[i][0] - 1)

                    num_problem += (info[i][0] - 1)

                else:

                    score += base * need

                    num_problem += need

                    break

        

        if score >= G:

            ans = min(ans, num_problem)



    print(ans)





if __name__ == "__main__":

    main()
D, G = list(map(int, input().split()))
p = [0 for i in range(D)]
c = [0 for i in range(D)]
for i in range(D):
    p[i], c[i] = list(map(int, input().split()))


def dfs(s):
    if len(s) == D:
        ans = 1000
        score = 0
        times = 0
        for i in range(D):
            if s[i] == "1":
                score += 100 * (i + 1) * p[i] + c[i]
                times += p[i]
        if score >= G:
            ans = min(ans, times)
        else:
            idx = s.rfind("0")
            for i in range(1, p[idx]):
                if score + 100 * (idx + 1) * i >= G:
                    ans = min(ans, times + i)
                    break
        return ans
    return min(dfs(s + "0"), dfs(s + "1"))


print((dfs("")))

def main():
    D, G = list(map(int, input().split()))
    info = [tuple(map(int, input().split())) for _ in range(D)]
    ans = 100 * 10
    for bit in range(1 << D):
        score = 0
        num_problem = 0
        # complete bonus
        for i in range(D):
            if (bit >> i) & 1:
                base = 100 * (i + 1)
                score += base * info[i][0] + info[i][1]
                num_problem += info[i][0]
        # other
        for i in range(D - 1, -1, -1):
            if score >= G:
                break
            if not ((bit >> i) & 1):
                base = 100 * (i + 1)
                rest = G - score
                need = (rest + base - 1) // base
                if need > info[i][0] - 1:
                    score += base * (info[i][0] - 1)
                    num_problem += info[i][0] - 1
                else:
                    score += base * need
                    num_problem += need
                    break
        if score >= G:
            ans = min(ans, num_problem)
    print(ans)


if __name__ == "__main__":
    main()

-D, G = list(map(int, input().split())) -p = [0 for i in range(D)] -c = [0 for i in range(D)] -for i in range(D): -    p[i], c[i] = list(map(int, input().split())) +def main(): +    D, G = list(map(int, input().split())) +    info = [tuple(map(int, input().split())) for _ in range(D)] +    ans = 100 * 10 +    for bit in range(1 << D): +        score = 0 +        num_problem = 0 +        # complete bonus +        for i in range(D): +            if (bit >> i) & 1: +                base = 100 * (i + 1) +                score += base * info[i][0] + info[i][1] +                num_problem += info[i][0] +        # other +        for i in range(D - 1, -1, -1): +            if score >= G: +                break +            if not ((bit >> i) & 1): +                base = 100 * (i + 1) +                rest = G - score +                need = (rest + base - 1) // base +                if need > info[i][0] - 1: +                    score += base * (info[i][0] - 1) +                    num_problem += info[i][0] - 1 +                else: +                    score += base * need +                    num_problem += need +                    break +        if score >= G: +            ans = min(ans, num_problem) +    print(ans) -def dfs(s): -    if len(s) == D: -        ans = 1000 -        score = 0 -        times = 0 -        for i in range(D): -            if s[i] == "1": -                score += 100 * (i + 1) * p[i] + c[i] -                times += p[i] -        if score >= G: -            ans = min(ans, times) -        else: -            idx = s.rfind("0") -            for i in range(1, p[idx]): -                if score + 100 * (idx + 1) * i >= G: -                    ans = min(ans, times + i) -                    break -        return ans -    return min(dfs(s + "0"), dfs(s + "1")) - - -print((dfs(""))) +if __name__ == "__main__": +    main()