title: Number Digits Product Two Numbers
signature: number_digits_product_two_numbers <- 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(
          86L, 39L, 
          4L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          81L, 87L, 
          4L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          48L, 84L, 
          4L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          64L, 80L, 
          4L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          56L, 20L, 
          4L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          5L, 70L, 
          3L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          25L, 13L, 
          3L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          94L, 83L, 
          4L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          5L, 55L, 
          3L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          46L, 46L, 
          4L
      )))
  
  }
  
  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;
  }