title: Fast Multiplication Method Without Using Multiplication Operator Russian Peasants Algorithm
signature: fastMultiplicationMethodWithoutUsingMultiplicationOperatorRussianPeasantsAlgorithm :: Integer -> Integer -> Integer
  fastMultiplicationMethodWithoutUsingMultiplicationOperatorRussianPeasantsAlgorithm a b = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> Integer -> String
  driver a b expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME a b) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (4) (33) (132) )
  
      printf "TEST-1...%s\n" (driver (36) (67) (2412) )
  
      printf "TEST-2...%s\n" (driver (65) (52) (3380) )
  
      printf "TEST-3...%s\n" (driver (55) (37) (2035) )
  
      printf "TEST-4...%s\n" (driver (35) (76) (2660) )
  
      printf "TEST-5...%s\n" (driver (69) (98) (6762) )
  
      printf "TEST-6...%s\n" (driver (84) (62) (5208) )
  
      printf "TEST-7...%s\n" (driver (5) (80) (400) )
  
      printf "TEST-8...%s\n" (driver (15) (36) (540) )
  
      printf "TEST-9...%s\n" (driver (67) (84) (5628) )
  
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;
  }