INF = float('inf')



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

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



sumP = sum([p for p, c in pcs])



def max2(a, b):

    return a if a >= b else b





# 【配るDP】

# dp[i+1][j]: pcs[i]まで考慮したとき、j問で達成できるスコアの最大値

dp = [[-INF] * (sumP + 1) for i in range(D + 1)]

dp[0][0] = 0

for i, (p, c) in enumerate(pcs):

    for j in range(sumP + 1):

        if dp[i][j] != -INF:

            for k in range(p):

                dp[i + 1][j + k] = max2(dp[i + 1][j + k], dp[i][j] + 100 * (i + 1) * k)

            dp[i + 1][j + p] = max2(dp[i + 1][j + p], dp[i][j] + 100 * (i + 1) * p + c)



for j in range(sumP + 1):

    if dp[D][j] >= G:

        print(j)

        break

from math import ceil



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

ps, cs = [], []

for _ in range(D):

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

    ps.append(p)

    cs.append(c)



ans = 1000

for pat in range(2 ** D):

    score = 0

    num = 0

    for i in range(D):

        if pat & (1 << i):

            score += 100 * (i + 1) * ps[i] + cs[i]

            num += ps[i]

        else:

            iRest = i



    if score < G:

        n = ceil((G - score) / (100 * (iRest + 1)))

        if n >= ps[iRest]: continue

        num += n



    ans = min(ans, num)



print(ans)

INF = float("inf")
D, G = list(map(int, input().split()))
pcs = [tuple(map(int, input().split())) for i in range(D)]
sumP = sum([p for p, c in pcs])


def max2(a, b):
    return a if a >= b else b


# 【配るDP】
# dp[i+1][j]: pcs[i]まで考慮したとき、j問で達成できるスコアの最大値
dp = [[-INF] * (sumP + 1) for i in range(D + 1)]
dp[0][0] = 0
for i, (p, c) in enumerate(pcs):
    for j in range(sumP + 1):
        if dp[i][j] != -INF:
            for k in range(p):
                dp[i + 1][j + k] = max2(dp[i + 1][j + k], dp[i][j] + 100 * (i + 1) * k)
            dp[i + 1][j + p] = max2(dp[i + 1][j + p], dp[i][j] + 100 * (i + 1) * p + c)
for j in range(sumP + 1):
    if dp[D][j] >= G:
        print(j)
        break

from math import ceil

D, G = list(map(int, input().split()))
ps, cs = [], []
for _ in range(D):
    p, c = list(map(int, input().split()))
    ps.append(p)
    cs.append(c)
ans = 1000
for pat in range(2**D):
    score = 0
    num = 0
    for i in range(D):
        if pat & (1 << i):
            score += 100 * (i + 1) * ps[i] + cs[i]
            num += ps[i]
        else:
            iRest = i
    if score < G:
        n = ceil((G - score) / (100 * (iRest + 1)))
        if n >= ps[iRest]:
            continue
        num += n
    ans = min(ans, num)
print(ans)

-INF = float("inf") +from math import ceil + -pcs = [tuple(map(int, input().split())) for i in range(D)] -sumP = sum([p for p, c in pcs]) - - -def max2(a, b): -    return a if a >= b else b - - -# 【配るDP】 -# dp[i+1][j]: pcs[i]まで考慮したとき、j問で達成できるスコアの最大値 -dp = [[-INF] * (sumP + 1) for i in range(D + 1)] -dp[0][0] = 0 -for i, (p, c) in enumerate(pcs): -    for j in range(sumP + 1): -        if dp[i][j] != -INF: -            for k in range(p): -                dp[i + 1][j + k] = max2(dp[i + 1][j + k], dp[i][j] + 100 * (i + 1) * k) -            dp[i + 1][j + p] = max2(dp[i + 1][j + p], dp[i][j] + 100 * (i + 1) * p + c) -for j in range(sumP + 1): -    if dp[D][j] >= G: -        print(j) -        break +ps, cs = [], [] +for _ in range(D): +    p, c = list(map(int, input().split())) +    ps.append(p) +    cs.append(c) +ans = 1000 +for pat in range(2**D): +    score = 0 +    num = 0 +    for i in range(D): +        if pat & (1 << i): +            score += 100 * (i + 1) * ps[i] + cs[i] +            num += ps[i] +        else: +            iRest = i +    if score < G: +        n = ceil((G - score) / (100 * (iRest + 1))) +        if n >= ps[iRest]: +            continue +        num += n +    ans = min(ans, num) +print(ans)