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

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

ans = 10**5



for i in range(2**D):

  score = 0

  tmp = 0

  solved = [False]*D

  for j in range(D):

    if (i>>j) & 1:

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

      tmp += pc[j][0]

      solved[j] = True

  if score >= G:

    ans = min(ans, tmp)

  else:

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

      if solved[k] == False:

        l = 0

        while score < G and l < pc[k][0]:

          score += (k+1)*100

          tmp += 1

          l += 1

        if score >= G:

          ans = min(ans, tmp)

          break

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

table = []

for i in range(D):

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

    table.append((i+1,p,c))



ans = 10**3

for i in range(1<<D):

    score = 0

    count = 0

    remain = []

    for j in range(D):

        a,p,c = table[j]

        if i & (1<<j):

            score += a*100*p+c

            count += p

        else:

            remain.append((a,p,c))

    if score >= G:

        ans = min(count,ans)

    else:

        remain.sort(reverse=True)

        a,p,c = remain[0]

        for k in range(p):

            score += a*100

            count += 1

            if score >= G:

                ans = min(count,ans)

print(ans)
D, G = list(map(int, input().split()))
pc = [list(map(int, input().split())) for i in range(D)]
ans = 10**5
for i in range(2**D):
    score = 0
    tmp = 0
    solved = [False] * D
    for j in range(D):
        if (i >> j) & 1:
            score += (j + 1) * 100 * pc[j][0] + pc[j][1]
            tmp += pc[j][0]
            solved[j] = True
    if score >= G:
        ans = min(ans, tmp)
    else:
        for k in range(D - 1, -1, -1):
            if solved[k] == False:
                l = 0
                while score < G and l < pc[k][0]:
                    score += (k + 1) * 100
                    tmp += 1
                    l += 1
                if score >= G:
                    ans = min(ans, tmp)
                    break
print(ans)

D, G = list(map(int, input().split()))
table = []
for i in range(D):
    p, c = list(map(int, input().split()))
    table.append((i + 1, p, c))
ans = 10**3
for i in range(1 << D):
    score = 0
    count = 0
    remain = []
    for j in range(D):
        a, p, c = table[j]
        if i & (1 << j):
            score += a * 100 * p + c
            count += p
        else:
            remain.append((a, p, c))
    if score >= G:
        ans = min(count, ans)
    else:
        remain.sort(reverse=True)
        a, p, c = remain[0]
        for k in range(p):
            score += a * 100
            count += 1
            if score >= G:
                ans = min(count, ans)
print(ans)

-pc = [list(map(int, input().split())) for i in range(D)] -ans = 10**5 -for i in range(2**D): +table = [] +for i in range(D): +    p, c = list(map(int, input().split())) +    table.append((i + 1, p, c)) +ans = 10**3 +for i in range(1 << D): -    tmp = 0 -    solved = [False] * D +    count = 0 +    remain = [] -        if (i >> j) & 1: -            score += (j + 1) * 100 * pc[j][0] + pc[j][1] -            tmp += pc[j][0] -            solved[j] = True +        a, p, c = table[j] +        if i & (1 << j): +            score += a * 100 * p + c +            count += p +        else: +            remain.append((a, p, c)) -        ans = min(ans, tmp) +        ans = min(count, ans) -        for k in range(D - 1, -1, -1): -            if solved[k] == False: -                l = 0 -                while score < G and l < pc[k][0]: -                    score += (k + 1) * 100 -                    tmp += 1 -                    l += 1 -                if score >= G: -                    ans = min(ans, tmp) -                    break +        remain.sort(reverse=True) +        a, p, c = remain[0] +        for k in range(p): +            score += a * 100 +            count += 1 +            if score >= G: +                ans = min(count, ans)