static void compute ( long n ) {
  long answer [ ] = new long [ 100 ] ;
  int pos = 0 ;
  for ( int i = 0 ;
  i <= 100 ;
  i ++ ) {
    long valueOnLeft = Math . abs ( n - i ) + sumOfDigits ( Math . abs ( n - i ) ) ;
    long valueOnRight = ( n + i ) + sumOfDigits ( n + i ) ;
    if ( valueOnRight == n ) answer [ pos ++ ] = ( n + i ) ;
    if ( valueOnLeft == n ) answer [ pos ++ ] = Math . abs ( n - i ) ;
  }
  if ( pos == 0 ) System . out . print ( - 1 ) ;
  else for ( int i = 0 ;
  i < pos ;
  i ++ ) System . out . println ( "X = " + answer [ i ] ) ;
}

static void compute ( long n ) { long answer [ ] = new long [ 100 ] ; int pos = 0 ; for ( int i = 0 ; i <= 100 ; i ++ ) { long valueOnLeft = Math . abs ( n - i ) + sumOfDigits ( Math . abs ( n - i ) ) ; long valueOnRight = ( n + i ) + sumOfDigits ( n + i ) ; if ( valueOnRight == n ) answer [ pos ++ ] = ( n + i ) ; if ( valueOnLeft == n ) answer [ pos ++ ] = Math . abs ( n - i ) ; } if ( pos == 0 ) System . out . print ( - 1 ) ; else for ( int i = 0 ; i < pos ; i ++ ) System . out . println ( " X ▁ = ▁ " + answer [ i ] ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) right: (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal))))) alternative: (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: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (array_access array: (identifier) index: (identifier))))))))))