title: Program Octal Decimal Conversion
signature: pub fn program_octal_decimal_conversion(n: 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(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        37, 
        31
      ));
      
      println!("TEST-1...{}", driver(
        25, 
        21
      ));
      
      println!("TEST-2...{}", driver(
        63, 
        51
      ));
      
      println!("TEST-3...{}", driver(
        66, 
        54
      ));
      
      println!("TEST-4...{}", driver(
        32, 
        26
      ));
      
      println!("TEST-5...{}", driver(
        5, 
        5
      ));
      
      println!("TEST-6...{}", driver(
        41, 
        33
      ));
      
      println!("TEST-7...{}", driver(
        82, 
        66
      ));
      
      println!("TEST-8...{}", driver(
        54, 
        44
      ));
      
      println!("TEST-9...{}", driver(
        5, 
        5
      ));
      
  }
source_py: def program_octal_decimal_conversion(n):
      num = n
      dec_value = 0
      base = 1
      temp = num
      while temp:
          last_digit = (temp % 10)
          temp = int((temp / 10))
          dec_value += (last_digit * base)
          base = (base * 8)
      return dec_value
source_cpp: int program_octal_decimal_conversion(int n) {
    int num = n;
    int dec_value = 0;
    int base = 1;
    int temp = num;
    while ( temp ) {
      int last_digit = temp % 10;
      temp = temp / 10;
      dec_value += last_digit * base;
      base = base * 8;
    }
    return dec_value;
  }