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

problem = []

bonus_score = []

for i in range(D):

    pi, ci = list(map(int, input().split()))

    problem.append(pi)

    bonus_score.append(ci)

total_problem = sum(problem)

dp= [[0 for k in range(total_problem + 1)] for i in range(D+1)]



for i in range(D):

    for k in range(total_problem + 1):

        for j in range(min(problem[i], k) + 1):

            dp[i+1][k] = max(dp[i+1][k], dp[i][k - j] + (i + 1) * 100 * j + (j//problem[i]) * bonus_score[i])

ans = 0

while dp[D][ans] < G:

    ans += 1

print(ans)

            

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

problem = []

bonus = []

for i in range(D):

    pi, ci = list(map(int, input().split()))

    problem.append(pi)

    bonus.append(ci)

ans = float('inf')

for S in range(1 << D):  # Sは2^Dの元

    score = sum([(problem[j] * 100 * (j + 1) + bonus[j]) * ((S >> j) & 1) for j in range(D)])

    count = sum([problem[j] * ((S >> j) & 1) for j in range(D)])

    if score >= G:

        ans = min(ans,count)

    else:

        for i in range(D):

            if (S >> i) & 1 == 0 and score + problem[i] * 100 * (i + 1) >= G: #Sにiが含まれないとき

                count_2 = count + (G - score + (100 * (i + 1)) - 1) // (100 * (i + 1))

                ans = min(ans, count_2)

print(ans)
D, G = list(map(int, input().split()))
problem = []
bonus_score = []
for i in range(D):
    pi, ci = list(map(int, input().split()))
    problem.append(pi)
    bonus_score.append(ci)
total_problem = sum(problem)
dp = [[0 for k in range(total_problem + 1)] for i in range(D + 1)]
for i in range(D):
    for k in range(total_problem + 1):
        for j in range(min(problem[i], k) + 1):
            dp[i + 1][k] = max(
                dp[i + 1][k],
                dp[i][k - j] + (i + 1) * 100 * j + (j // problem[i]) * bonus_score[i],
            )
ans = 0
while dp[D][ans] < G:
    ans += 1
print(ans)

D, G = list(map(int, input().split()))
problem = []
bonus = []
for i in range(D):
    pi, ci = list(map(int, input().split()))
    problem.append(pi)
    bonus.append(ci)
ans = float("inf")
for S in range(1 << D):  # Sは2^Dの元
    score = sum(
        [(problem[j] * 100 * (j + 1) + bonus[j]) * ((S >> j) & 1) for j in range(D)]
    )
    count = sum([problem[j] * ((S >> j) & 1) for j in range(D)])
    if score >= G:
        ans = min(ans, count)
    else:
        for i in range(D):
            if (S >> i) & 1 == 0 and score + problem[i] * 100 * (
                i + 1
            ) >= G:  # Sにiが含まれないとき
                count_2 = count + (G - score + (100 * (i + 1)) - 1) // (100 * (i + 1))
                ans = min(ans, count_2)
print(ans)

-bonus_score = [] +bonus = [] -    bonus_score.append(ci) -total_problem = sum(problem) -dp = [[0 for k in range(total_problem + 1)] for i in range(D + 1)] -for i in range(D): -    for k in range(total_problem + 1): -        for j in range(min(problem[i], k) + 1): -            dp[i + 1][k] = max( -                dp[i + 1][k], -                dp[i][k - j] + (i + 1) * 100 * j + (j // problem[i]) * bonus_score[i], -            ) -ans = 0 -while dp[D][ans] < G: -    ans += 1 +    bonus.append(ci) +ans = float("inf") +for S in range(1 << D):  # Sは2^Dの元 +    score = sum( +        [(problem[j] * 100 * (j + 1) + bonus[j]) * ((S >> j) & 1) for j in range(D)] +    ) +    count = sum([problem[j] * ((S >> j) & 1) for j in range(D)]) +    if score >= G: +        ans = min(ans, count) +    else: +        for i in range(D): +            if (S >> i) & 1 == 0 and score + problem[i] * 100 * ( +                i + 1 +            ) >= G:  # Sにiが含まれないとき +                count_2 = count + (G - score + (100 * (i + 1)) - 1) // (100 * (i + 1)) +                ans = min(ans, count_2)