title: Number Digits Product Two Numbers 1
signature: number_digits_product_two_numbers_1 <- function(a, b) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(a, b, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(a, b), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          97L, 91L, 
          4L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          52L, 49L, 
          4L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          95L, 34L, 
          4L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          35L, 40L, 
          4L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          40L, 85L, 
          4L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          18L, 97L, 
          4L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          92L, 15L, 
          4L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          73L, 98L, 
          4L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          10L, 62L, 
          3L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          82L, 22L, 
          4L
      )))
  
  }
  
  main()
source_py: def number_digits_product_two_numbers_1(a, b):
      if ((a == 0) or (b == 0)):
          return 1
      return (math.floor((math.log10(abs(a)) + math.log10(abs(b)))) + 1)
source_cpp: int number_digits_product_two_numbers_1(int a, int b) {
    if ( a == 0 || b == 0 ) return 1;
    return floor ( log10 ( abs ( a ) ) + log10 ( abs ( b ) ) ) + 1;
  }