title: Number Digits Product Two Numbers
signature: function numberDigitsProductTwoNumbers(a: number, b: number): number {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(a: number, b: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(86, 39, 4);
    console.log(`TEST-0...${result}`);
  
    result = driver(81, 87, 4);
    console.log(`TEST-1...${result}`);
  
    result = driver(48, 84, 4);
    console.log(`TEST-2...${result}`);
  
    result = driver(64, 80, 4);
    console.log(`TEST-3...${result}`);
  
    result = driver(56, 20, 4);
    console.log(`TEST-4...${result}`);
  
    result = driver(5, 70, 3);
    console.log(`TEST-5...${result}`);
  
    result = driver(25, 13, 3);
    console.log(`TEST-6...${result}`);
  
    result = driver(94, 83, 4);
    console.log(`TEST-7...${result}`);
  
    result = driver(5, 55, 3);
    console.log(`TEST-8...${result}`);
  
    result = driver(46, 46, 4);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
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;
  }