title: Breaking Number First Part Integral Division Second Power 10
signature: class Solution {
  
      public int BreakingNumberFirstPartIntegralDivisionSecondPower10(string n) {
test_code: using System;
  using System.Numerics;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Security.Cryptography;
  using System.Web.UI;
  using System.Web.Script.Serialization;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  namespace EvaluatePrediction {
      class TestRunner {
          public bool ValidateSolution(int actual, int expected){
              return new JavaScriptSerializer().Serialize(actual) == new JavaScriptSerializer().Serialize(expected);
          }
  
          public string driver(string n, int expected){
              try{
                PLACEHOLDER_CLS_NAME solution_cls = new PLACEHOLDER_CLS_NAME();
                int pred_result = solution_cls.PLACEHOLDER_FN_NAME(n); 
                if (ValidateSolution(
                      pred_result,
                      expected)){
                  return "PASSED";
                }
                return "FAILED";
              } 
              catch (Exception exception_obj)
              {
                return exception_obj.GetType().FullName;
              }
          }
          static void Main(string[] args) {
              TestRunner runner = new TestRunner();
              String result;
              result = runner.driver(
                  "ZCoQhuM", 
                  0
              );
              Console.WriteLine(string.Format(
                  "TEST-0...{0}",
                  result)
              );result = runner.driver(
                  "2674377254", 
                  0
              );
              Console.WriteLine(string.Format(
                  "TEST-1...{0}",
                  result)
              );result = runner.driver(
                  "11", 
                  1
              );
              Console.WriteLine(string.Format(
                  "TEST-2...{0}",
                  result)
              );result = runner.driver(
                  "LbuGlvRyWAPBpo", 
                  0
              );
              Console.WriteLine(string.Format(
                  "TEST-3...{0}",
                  result)
              );result = runner.driver(
                  "26382426486138", 
                  0
              );
              Console.WriteLine(string.Format(
                  "TEST-4...{0}",
                  result)
              );result = runner.driver(
                  "111010111010", 
                  2
              );
              Console.WriteLine(string.Format(
                  "TEST-5...{0}",
                  result)
              );result = runner.driver(
                  "hUInqJXNdbfP", 
                  0
              );
              Console.WriteLine(string.Format(
                  "TEST-6...{0}",
                  result)
              );result = runner.driver(
                  "5191", 
                  0
              );
              Console.WriteLine(string.Format(
                  "TEST-7...{0}",
                  result)
              );result = runner.driver(
                  "1110101101", 
                  1
              );
              Console.WriteLine(string.Format(
                  "TEST-8...{0}",
                  result)
              );result = runner.driver(
                  "2202200", 
                  2
              );
              Console.WriteLine(string.Format(
                  "TEST-9...{0}",
                  result)
              );
          }
      }
  }
  
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;
  }