title: Fast Multiplication Method Without Using Multiplication Operator Russian Peasants Algorithm
signature: fastMultiplicationMethodWithoutUsingMultiplicationOperatorRussianPeasantsAlgorithm(a, b) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(a, b, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          4, 33, 
          132)
      }");
  
      print("TEST-1...${driver(
          36, 67, 
          2412)
      }");
  
      print("TEST-2...${driver(
          65, 52, 
          3380)
      }");
  
      print("TEST-3...${driver(
          55, 37, 
          2035)
      }");
  
      print("TEST-4...${driver(
          35, 76, 
          2660)
      }");
  
      print("TEST-5...${driver(
          69, 98, 
          6762)
      }");
  
      print("TEST-6...${driver(
          84, 62, 
          5208)
      }");
  
      print("TEST-7...${driver(
          5, 80, 
          400)
      }");
  
      print("TEST-8...${driver(
          15, 36, 
          540)
      }");
  
      print("TEST-9...${driver(
          67, 84, 
          5628)
      }");
  
      return 0;
  }
source_py: def fast_multiplication_method_without_using_multiplication_operator_russian_peasants_algorithm(a, b):
      res = 0
      while (b > 0):
          if (b & 1):
              res = (res + a)
          a = (a << 1)
          b = (b >> 1)
      return res
source_cpp: unsigned int fast_multiplication_method_without_using_multiplication_operator_russian_peasants_algorithm(unsigned int a, unsigned int b) {
    int res = 0;
    while ( b > 0 ) {
      if ( b & 1 ) res = res + a;
      a = a << 1;
      b = b >> 1;
    }
    return res;
  }