title: Number Digits Product Two Numbers 1
signature: func numberDigitsProductTwoNumbers1(a int, b int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(a int, b int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(a, b),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(97, 
  	91, 4)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(52, 
  	49, 4)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(95, 
  	34, 4)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(35, 
  	40, 4)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(40, 
  	85, 4)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(18, 
  	97, 4)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(92, 
  	15, 4)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(73, 
  	98, 4)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(10, 
  	62, 3)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(82, 
  	22, 4)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }