public static void main ( String [ ] $ ) {
  Scanner sc = new Scanner ( in ) ;
  int d = sc . nextInt ( ) ;
  int g = sc . nextInt ( ) ;
  int [ ] p = new int [ d + 1 ] ;
  int [ ] c = new int [ d + 1 ] ;
  for ( int i = 0 ;
  i < d ;
  i ++ ) {
    p [ i + 1 ] = sc . nextInt ( ) ;
    c [ i + 1 ] = sc . nextInt ( ) ;
  }
  int ans = 1000000000 ;
  for ( int i = 0 ;
  i < ( 1 << d ) ;
  i ++ ) {
    int temp = 0 ;
    long score = 0 ;
    for ( int j = 0 ;
    j < d ;
    j ++ ) {
      if ( ( 1 & ( i >> j ) ) == 1 ) {
        score += ( j + 1 ) * 100 * p [ j + 1 ] + c [ j + 1 ] ;
        temp += p [ j + 1 ] ;
      }
    }
    if ( score >= g ) {
      ans = min ( ans , temp ) ;
    }
    else {
      for ( int j = d - 1 ;
      j > - 1 ;
      j -- ) {
        if ( ( 1 & ( i >> j ) ) == 1 ) continue ;
        else {
          for ( int k = 1 ;
          k < p [ j + 1 ] ;
          k ++ ) {
            score += ( j + 1 ) * 100 ;
            temp += 1 ;
            if ( score >= g ) {
              ans = min ( ans , temp ) ;
              break ;
            }
          }
          break ;
        }
      }
    }
  }
  out . println ( ans ) ;
}

public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int d = sc . nextInt ( ) ; int g = sc . nextInt ( ) ; int [ ] p = new int [ d + 1 ] ; int [ ] c = new int [ d + 1 ] ; for ( int i = 0 ; i < d ; i ++ ) { p [ i + 1 ] = sc . nextInt ( ) ; c [ i + 1 ] = sc . nextInt ( ) ; } int ans = 1000000000 ; for ( int i = 0 ; i < ( 1 << d ) ; i ++ ) { int temp = 0 ; long score = 0 ; for ( int j = 0 ; j < d ; j ++ ) { if ( ( 1 & ( i >> j ) ) == 1 ) { score += ( j + 1 ) * 100 * p [ j + 1 ] + c [ j + 1 ] ; temp += p [ j + 1 ] ; } } if ( score >= g ) { ans = min ( ans , temp ) ; } else { for ( int j = d - 1 ; j > - 1 ; j -- ) { if ( ( 1 & ( i >> j ) ) == 1 ) continue ; else { for ( int k = 1 ; k < p [ j + 1 ] ; k ++ ) { score += ( j + 1 ) * 100 ; temp += 1 ; if ( score >= g ) { ans = min ( ans , temp ) ; break ; } } break ; } } } } out . println ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))))) alternative: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (unary_expression operand: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (decimal_integer_literal))) consequence: (continue_statement) alternative: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (break_statement))))) (break_statement))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))