title: Number Substrings String
signature: def numberSubstringsString(str: String) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(str: String, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(str),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        "gZFGZsHCimLf", 
        78    
      )}")   
  
  
      println(s"TEST-1...${driver(
        "505357", 
        21    
      )}")   
  
  
      println(s"TEST-2...${driver(
        "011011101", 
        45    
      )}")   
  
  
      println(s"TEST-3...${driver(
        "ovfwP Osauz", 
        66    
      )}")   
  
  
      println(s"TEST-4...${driver(
        "92132238746026", 
        105    
      )}")   
  
  
      println(s"TEST-5...${driver(
        "01100", 
        15    
      )}")   
  
  
      println(s"TEST-6...${driver(
        "RaOWYQRfiWKSyC", 
        105    
      )}")   
  
  
      println(s"TEST-7...${driver(
        "861330202", 
        45    
      )}")   
  
  
      println(s"TEST-8...${driver(
        "001100010", 
        45    
      )}")   
  
  
      println(s"TEST-9...${driver(
        "uvpKlGUBLOMba", 
        91    
      )}")   
  
  }
  
source_py: def number_substrings_string(str):
      n = len(str)
      return int(((n * (n + 1)) / 2))
source_cpp: int number_substrings_string(string str) {
    int n = str . length ( );
    return n * ( n + 1 ) / 2;
  }