public static String LedRequired ( String s , int led ) {
  int seg [ ] = {
    6 , 2 , 5 , 5 , 4 , 5 , 6 , 3 , 7 , 6 };
    int count = 0 ;
    for ( int i = 0 ;
    i < s . length ( ) ;
    ++ i ) {
      count += seg [ ( int ) ( s . charAt ( i ) ) - 48 ] ;
    }
    if ( count <= led ) return "YES" ;
    else return "NO" ;
  }
  
public static String LedRequired ( String s , int led ) { int seg [ ] = { 6 , 2 , 5 , 5 , 4 , 5 , 6 , 3 , 7 , 6 } ; int count = 0 ; for ( int i = 0 ; i < s . length ( ) ; ++ i ) { count += seg [ ( int ) ( s . charAt ( i ) ) - 48 ] ; } if ( count <= led ) return " YES " ; else return " NO " ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_initializer (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (return_statement (string_literal)) alternative: (return_statement (string_literal)))))