title: Number Digits Product Two Numbers
signature: func numberDigitsProductTwoNumbers(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(86, 
  	39, 4)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(81, 
  	87, 4)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(48, 
  	84, 4)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(64, 
  	80, 4)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(56, 
  	20, 4)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(5, 
  	70, 3)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(25, 
  	13, 3)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(94, 
  	83, 4)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(5, 
  	55, 3)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(46, 
  	46, 4)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def number_digits_product_two_numbers(a, b):
      count = 0
      p = abs((a * b))
      if (p == 0):
          return 1
      while (p > 0):
          count = (count + 1)
          p = (p // 10)
      return count
source_cpp: int number_digits_product_two_numbers(int a, int b) {
    int count = 0;
    int p = abs ( a * b );
    if ( p == 0 ) return 1;
    while ( p > 0 ) {
      count ++;
      p = p / 10;
    }
    return count;
  }