output_description: Print the minimum number of problems that needs to be solved in order to have
  a total score of G or more points. Note that this objective is always
  achievable (see Constraints).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      D G
      p_1 c_1
      :
      p_D c_D
attempt: n, s = map(int, input().split())
  q = [list(map(int, input().split())) for i in range(n)]
  
  import numpy as np
  import copy
  
  dt = [0] * n
  cp = [0] * n
  ck = [0] * n
  
  for i in range(n):
      dt[i] = 100 * (i + 1) + q[i][1] // q[i][0]
      cp[i] = 100 * (i + 1) * q[i][0] + q[i][1]
  
  score = sum(cp)
  cnt = np.sum(q, axis=0)[0]
  
  for i in range(n):
      id = np.argmin(dt)
      score -= cp[id]
      cnt -= q[id][0]
      dt[id] = 999999999
      ck[id] = i + 1
      if score <= s:
          break
  
  cnt1 = 999
  for i in range(n):
      if dt[i] == 999999999:
          if cp[i] + score >= s:
              cnt1 = min(cnt1, q[i][0])
  
  res1 = cnt + cnt1
  
  for i in range(n):
      if ck[n - 1 - i] > 0:
          id2 = n - 1 - i
          break
  
  for i in range(q[id2][0]):
      score += (id2 + 1) * 100
      if score >= s:
          res2 = cnt + i + 1
          break
  
  print(min(res1, res2))
  
problem_description: Statement
  
  A programming competition site _AtCode_ provides algorithmic problems. Each
  problem is allocated a score based on its difficulty. Currently, for each
  integer i between 1 and D (inclusive), there are p_i problems with a score of
  100i points. These p_1 + … + p_D problems are all of the problems available on
  AtCode.
  
  A user of AtCode has a value called _total score_. The total score of a user
  is the sum of the following two elements:
  
    * Base score: the sum of the scores of all problems solved by the user.
    * Perfect bonuses: when a user solves all problems with a score of 100i points, he/she earns the perfect bonus of c_i points, aside from the base score (1 ≤ i ≤ D).
  
  Takahashi, who is the new user of AtCode, has not solved any problem. His
  objective is to have a total score of G or more points. At least how many
  problems does he need to solve for this objective?
samples: [{"input": "2 700\n    3 500\n    5 800", "output": "3\n    \n\nIn this case, there are three problems each with 100 points and five problems\neach with 200 points. The perfect bonus for solving all the 100-point problems\nis 500 points, and the perfect bonus for solving all the 200-point problems is\n800 points. Takahashi's objective is to have a total score of 700 points or\nmore.\n\nOne way to achieve this objective is to solve four 200-point problems and earn\na base score of 800 points. However, if we solve three 100-point problems, we\ncan earn the perfect bonus of 500 points in addition to the base score of 300\npoints, for a total score of 800 points, and we can achieve the objective with\nfewer problems.\n\n* * *"}, {"input": "2 2000\n    3 500\n    5 800", "output": "7\n    \n\nThis case is similar to Sample Input 1, but the Takahashi's objective this\ntime is 2000 points or more. In this case, we inevitably need to solve all\nfive 200-point problems, and by solving two 100-point problems additionally we\nhave the total score of 2000 points.\n\n* * *"}, {"input": "2 400\n    3 500\n    5 800", "output": "2\n    \n\nThis case is again similar to Sample Input 1, but the Takahashi's objective\nthis time is 400 points or more. In this case, we only need to solve two\n200-point problems to achieve the objective.\n\n* * *"}, {"input": "5 25000\n    20 1000\n    40 1000\n    50 1000\n    30 1000\n    1 1000", "output": "66\n    \n\nThere is only one 500-point problem, but the perfect bonus can be earned even\nin such a case."}]