title: Number Of Substrings With Odd Decimal Value In A Binary String
signature: def number_of_substrings_with_odd_decimal_value_in_a_binary_string(s):
source_py: def number_of_substrings_with_odd_decimal_value_in_a_binary_string(s):
      n = len(s)
      auxArr = [0 for i in range(n)]
      if (s[0] == '1'):
          auxArr[0] = 1
      for i in range(0, n):
          if (s[i] == '1'):
              auxArr[i] = (auxArr[(i - 1)] + 1)
          else:
              auxArr[i] = auxArr[(i - 1)]
      count = 0
      for i in range((n - 1), (- 1), (- 1)):
          if (s[i] == '1'):
              count += auxArr[i]
      return count
source_cpp: int number_of_substrings_with_odd_decimal_value_in_a_binary_string(string s) {
    int n = s . length ( );
    int auxArr [ n ] = {
      0 };
      if ( s [ 0 ] == '1' ) auxArr [ 0 ] = 1;
      for ( int i = 1;
      i < n;
      i ++ ) {
        if ( s [ i ] == '1' ) auxArr [ i ] = auxArr [ i - 1 ] + 1;
        else auxArr [ i ] = auxArr [ i - 1 ];
      }
      int count = 0;
      for ( int i = n - 1;
      i >= 0;
      i -- ) if ( s [ i ] == '1' ) count += auxArr [ i ];
      return count;
    }
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(s, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              s),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver("OGiOkJF", 0)
      print(f"TEST-0...{result}")
  
      result = driver("517376", 1)
      print(f"TEST-1...{result}")
  
      result = driver("11", 3)
      print(f"TEST-2...{result}")
  
      result = driver("Ze", 0)
      print(f"TEST-3...{result}")
  
      result = driver("8763644247018", 1)
      print(f"TEST-4...{result}")
  
      result = driver("00111010001", 15)
      print(f"TEST-5...{result}")
  
      result = driver("HGwkBKUOVu", 0)
      print(f"TEST-6...{result}")
  
      result = driver("652", 0)
      print(f"TEST-7...{result}")
  
      result = driver("101000011110", 21)
      print(f"TEST-8...{result}")
  
      result = driver("kvdpG ", 0)
      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: number_of_substrings_with_odd_decimal_value_in_a_binary_string
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"s": "OGiOkJF"}}, {"idx": 1, "outputs": 1, "inputs": {"s": "517376"}}, {"idx": 2, "outputs": 3, "inputs": {"s": "11"}}, {"idx": 3, "outputs": 0, "inputs": {"s": "Ze"}}, {"idx": 4, "outputs": 1, "inputs": {"s": "8763644247018"}}, {"idx": 5, "outputs": 15, "inputs": {"s": "00111010001"}}, {"idx": 6, "outputs": 0, "inputs": {"s": "HGwkBKUOVu"}}, {"idx": 7, "outputs": 0, "inputs": {"s": "652"}}, {"idx": 8, "outputs": 21, "inputs": {"s": "101000011110"}}, {"idx": 9, "outputs": 0, "inputs": {"s": "kvdpG "}}]
question_info.entry_cls_name: Solution