static int numberofterm ( int digit , int number ) {
  int firstnum = ( int ) Math . pow ( 10 , digit - 1 ) ;
  int lastnum = ( int ) Math . pow ( 10 , digit ) ;
  firstnum = ( firstnum - firstnum % number ) + number ;
  lastnum = ( lastnum - lastnum % number ) ;
  return ( ( lastnum - firstnum ) / number + 1 ) ;
}

static int numberofterm ( int digit , int number ) { int firstnum = ( int ) Math . pow ( 10 , digit - 1 ) ; int lastnum = ( int ) Math . pow ( 10 , digit ) ; firstnum = ( firstnum - firstnum % number ) + number ; lastnum = ( lastnum - lastnum % number ) ; return ( ( lastnum - firstnum ) / number + 1 ) ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (integral_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (integral_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (return_statement (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)) right: (decimal_integer_literal))))))