title: Breaking Number First Part Integral Division Second Power 10
signature: breaking_number_first_part_integral_division_second_power_10 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "ZCoQhuM", 
          0L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "2674377254", 
          0L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "11", 
          1L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "LbuGlvRyWAPBpo", 
          0L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "26382426486138", 
          0L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "111010111010", 
          2L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "hUInqJXNdbfP", 
          0L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "5191", 
          0L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "1110101101", 
          1L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          "2202200", 
          2L
      )))
  
  }
  
  main()
source_py: def breaking_number_first_part_integral_division_second_power_10(N):
      length = len(N)
      l = int((length / 2))
      count = 0
      for i in range((l + 1)):
          s = N[0:(0 + i)]
          l1 = len(s)
          t = N[i:(l1 + i)]
          try:
              if ((s[0] == '0') or (t[0] == '0')):
                  continue
          except:
              continue
          if (s == t):
              count += 1
      return count
source_cpp: int breaking_number_first_part_integral_division_second_power_10(string N) {
    int len = N . length ( );
    int l = ( len ) / 2;
    int count = 0;
    for ( int i = 1;
    i <= l;
    i ++ ) {
      string s = N . substr ( 0, i );
      int l1 = s . length ( );
      string t = N . substr ( i, l1 );
      if ( s [ 0 ] == '0' || t [ 0 ] == '0' ) continue;
      if ( s . compare ( t ) == 0 ) count ++;
    }
    return count;
  }