static void printSmallestNumber ( int a , int b ) {
  for ( int [ ] row : dp ) {
    Arrays . fill ( row , - 1 ) ;
  }
  dp [ 0 ] [ 0 ] = 0 ;
  int k = minimumNumberOfDigits ( a , b ) ;
  if ( k == - 1 || k > 100 ) {
    System . out . println ( "-1" ) ;
  }
  else {
    while ( a > 0 && b > 0 ) {
      for ( int i = 1 ;
      i <= 9 ;
      i ++ ) {
        if ( a >= i && b >= i * i && 1 + dp [ a - i ] [ b - i * i ] == dp [ a ] [ b ] ) {
          System . out . print ( i ) ;
          a -= i ;
          b -= i * i ;
          break ;
        }
      }
    }
  }
}

static void printSmallestNumber ( int a , int b ) { for ( int [ ] row : dp ) { Arrays . fill ( row , - 1 ) ; } dp [ 0 ] [ 0 ] = 0 ; int k = minimumNumberOfDigits ( a , b ) ; if ( k == - 1 || k > 100 ) { System . out . println ( " - 1" ) ; } else { while ( a > 0 && b > 0 ) { for ( int i = 1 ; i <= 9 ; i ++ ) { if ( a >= i && b >= i * i && 1 + dp [ a - i ] [ b - i * i ] == dp [ a ] [ b ] ) { System . out . print ( i ) ; a -= i ; b -= i * i ; break ; } } } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (enhanced_for_statement type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier) value: (identifier) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (unary_expression operand: (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (unary_expression operand: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) index: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (break_statement)))))))))))