title: Decimal Binary Conversion Without Using Arithmetic Operators
signature: pub fn decimal_binary_conversion_without_using_arithmetic_operators(n: i32) -> String {
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: String, expected: String)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: String)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        35, 
        "100011".to_string()
      ));
      
      println!("TEST-1...{}", driver(
        17, 
        "10001".to_string()
      ));
      
      println!("TEST-2...{}", driver(
        8, 
        "1000".to_string()
      ));
      
      println!("TEST-3...{}", driver(
        99, 
        "1100011".to_string()
      ));
      
      println!("TEST-4...{}", driver(
        57, 
        "111001".to_string()
      ));
      
      println!("TEST-5...{}", driver(
        39, 
        "100111".to_string()
      ));
      
      println!("TEST-6...{}", driver(
        99, 
        "1100011".to_string()
      ));
      
      println!("TEST-7...{}", driver(
        14, 
        "1110".to_string()
      ));
      
      println!("TEST-8...{}", driver(
        22, 
        "10110".to_string()
      ));
      
      println!("TEST-9...{}", driver(
        7, 
        "111".to_string()
      ));
      
  }
source_py: def decimal_binary_conversion_without_using_arithmetic_operators(n):
      if (n == 0):
          return '0'
      bin = ''
      while (n > 0):
          if ((n & 1) == 0):
              bin = ('0' + bin)
          else:
              bin = ('1' + bin)
          n = (n >> 1)
      return bin
source_cpp: string decimal_binary_conversion_without_using_arithmetic_operators(int n) {
    if ( n == 0 ) return "0";
    string bin = "";
    while ( n > 0 ) {
      bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin;
      n >>= 1;
    }
    return bin;
  }