title: Number Substrings String
signature: class Solution {
  
      public Integer numberSubstringsString(String str) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: numberSubstringsString
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 78, "inputs": {"str": "gZFGZsHCimLf"}}, {"idx": 1, "outputs": 21, "inputs": {"str": "505357"}}, {"idx": 2, "outputs": 45, "inputs": {"str": "011011101"}}, {"idx": 3, "outputs": 66, "inputs": {"str": "ovfwP Osauz"}}, {"idx": 4, "outputs": 105, "inputs": {"str": "92132238746026"}}, {"idx": 5, "outputs": 15, "inputs": {"str": "01100"}}, {"idx": 6, "outputs": 105, "inputs": {"str": "RaOWYQRfiWKSyC"}}, {"idx": 7, "outputs": 45, "inputs": {"str": "861330202"}}, {"idx": 8, "outputs": 45, "inputs": {"str": "001100010"}}, {"idx": 9, "outputs": 91, "inputs": {"str": "uvpKlGUBLOMba"}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(String str, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(str,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution("gZFGZsHCimLf", 78);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("505357", 21);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("011011101", 45);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("ovfwP Osauz", 66);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("92132238746026", 105);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("01100", 15);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("RaOWYQRfiWKSyC", 105);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("861330202", 45);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("001100010", 45);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("uvpKlGUBLOMba", 91);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String str, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(str),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__