title: Count Of Pairs Satisfying The Given Condition
signature: def count_of_pairs_satisfying_the_given_condition(a, b):
source_py: def count_of_pairs_satisfying_the_given_condition(a, b):
      s = str(b)
      i = 0
      while (i < len(s)):
          if (s[i] != '9'):
              break
          i += 1
      result = 0
      if (i == len(s)):
          result = (a * len(s))
      else:
          result = (a * (len(s) - 1))
      return result
source_cpp: int count_of_pairs_satisfying_the_given_condition(int a, int b) {
    string s = to_string ( b );
    int i;
    for ( i = 0;
    i < s . length ( );
    i ++ ) {
      if ( s [ i ] != '9' ) break;
    }
    int result;
    if ( i == s . length ( ) ) result = a * s . length ( );
    else result = a * ( s . length ( ) - 1 );
    return result;
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(a, b, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              a, b),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(31, 91, 31)
      print(f"TEST-0...{result}")
  
      result = driver(72, 85, 72)
      print(f"TEST-1...{result}")
  
      result = driver(23, 49, 23)
      print(f"TEST-2...{result}")
  
      result = driver(42, 32, 42)
      print(f"TEST-3...{result}")
  
      result = driver(13, 7, 0)
      print(f"TEST-4...{result}")
  
      result = driver(93, 5, 0)
      print(f"TEST-5...{result}")
  
      result = driver(33, 32, 33)
      print(f"TEST-6...{result}")
  
      result = driver(94, 76, 94)
      print(f"TEST-7...{result}")
  
      result = driver(60, 60, 60)
      print(f"TEST-8...{result}")
  
      result = driver(11, 26, 11)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: count_of_pairs_satisfying_the_given_condition
question_info.test_list: [{"idx": 0, "outputs": 31, "inputs": {"a": 31, "b": 91}}, {"idx": 1, "outputs": 72, "inputs": {"a": 72, "b": 85}}, {"idx": 2, "outputs": 23, "inputs": {"a": 23, "b": 49}}, {"idx": 3, "outputs": 42, "inputs": {"a": 42, "b": 32}}, {"idx": 4, "outputs": 0, "inputs": {"a": 13, "b": 7}}, {"idx": 5, "outputs": 0, "inputs": {"a": 93, "b": 5}}, {"idx": 6, "outputs": 33, "inputs": {"a": 33, "b": 32}}, {"idx": 7, "outputs": 94, "inputs": {"a": 94, "b": 76}}, {"idx": 8, "outputs": 60, "inputs": {"a": 60, "b": 60}}, {"idx": 9, "outputs": 11, "inputs": {"a": 11, "b": 26}}]
question_info.entry_cls_name: Solution