title: Breaking Number First Part Integral Division Second Power 10
signature: pub fn breaking_number_first_part_integral_division_second_power_10(n: String) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: String, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "ZCoQhuM".to_string(), 
        0
      ));
      
      println!("TEST-1...{}", driver(
        "2674377254".to_string(), 
        0
      ));
      
      println!("TEST-2...{}", driver(
        "11".to_string(), 
        1
      ));
      
      println!("TEST-3...{}", driver(
        "LbuGlvRyWAPBpo".to_string(), 
        0
      ));
      
      println!("TEST-4...{}", driver(
        "26382426486138".to_string(), 
        0
      ));
      
      println!("TEST-5...{}", driver(
        "111010111010".to_string(), 
        2
      ));
      
      println!("TEST-6...{}", driver(
        "hUInqJXNdbfP".to_string(), 
        0
      ));
      
      println!("TEST-7...{}", driver(
        "5191".to_string(), 
        0
      ));
      
      println!("TEST-8...{}", driver(
        "1110101101".to_string(), 
        1
      ));
      
      println!("TEST-9...{}", driver(
        "2202200".to_string(), 
        2
      ));
      
  }
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;
  }