title: Fast Multiplication Method Without Using Multiplication Operator Russian Peasants Algorithm
signature: fun fastMultiplicationMethodWithoutUsingMultiplicationOperatorRussianPeasantsAlgorithm(a: Int, b: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(a: Int, b: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(4, 33, 132)
      println("TEST-0...${result}")
      
      result = driver(36, 67, 2412)
      println("TEST-1...${result}")
      
      result = driver(65, 52, 3380)
      println("TEST-2...${result}")
      
      result = driver(55, 37, 2035)
      println("TEST-3...${result}")
      
      result = driver(35, 76, 2660)
      println("TEST-4...${result}")
      
      result = driver(69, 98, 6762)
      println("TEST-5...${result}")
      
      result = driver(84, 62, 5208)
      println("TEST-6...${result}")
      
      result = driver(5, 80, 400)
      println("TEST-7...${result}")
      
      result = driver(15, 36, 540)
      println("TEST-8...${result}")
      
      result = driver(67, 84, 5628)
      println("TEST-9...${result}")
      
          
  }
  
  main()
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;
  }