title: Multiply Large Integers Under Large Modulo
signature: pub fn multiply_large_integers_under_large_modulo(a: i32, b: i32, mod_arg2: i32) -> 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(a: i32, b: i32, mod_arg2: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(a, b, mod_arg2), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        60, 24, 58, 
        48
      ));
      
      println!("TEST-1...{}", driver(
        46, 43, 29, 
        6
      ));
      
      println!("TEST-2...{}", driver(
        4, 50, 71, 
        58
      ));
      
      println!("TEST-3...{}", driver(
        67, 1, 66, 
        1
      ));
      
      println!("TEST-4...{}", driver(
        93, 35, 73, 
        43
      ));
      
      println!("TEST-5...{}", driver(
        89, 97, 8, 
        1
      ));
      
      println!("TEST-6...{}", driver(
        8, 78, 55, 
        19
      ));
      
      println!("TEST-7...{}", driver(
        53, 73, 22, 
        19
      ));
      
      println!("TEST-8...{}", driver(
        96, 92, 83, 
        34
      ));
      
      println!("TEST-9...{}", driver(
        38, 64, 83, 
        25
      ));
      
  }
source_py: def multiply_large_integers_under_large_modulo(a, b, mod):
      res = 0
      a = (a % mod)
      while b:
          if (b & 1):
              res = ((res + a) % mod)
          a = ((2 * a) % mod)
          b >>= 1
      return res
source_cpp: long long multiply_large_integers_under_large_modulo(long long a, long long b, long long mod) {
    long long res = 0;
    a %= mod;
    while ( b ) {
      if ( b & 1 ) res = ( res + a ) % mod;
      a = ( 2 * a ) % mod;
      b >>= 1;
    }
    return res;
  }