title: Check If A Number Is Power Of Another Number 1
signature: pub fn check_if_a_number_is_power_of_another_number_1(x: i32, y: 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(x: i32, y: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(x, y), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        57, 1, 
        1
      ));
      
      println!("TEST-1...{}", driver(
        3, 9, 
        1
      ));
      
      println!("TEST-2...{}", driver(
        10, 101, 
        1
      ));
      
      println!("TEST-3...{}", driver(
        10, 10000, 
        1
      ));
      
      println!("TEST-4...{}", driver(
        6, 46656, 
        1
      ));
      
      println!("TEST-5...{}", driver(
        2, 2048, 
        1
      ));
      
      println!("TEST-6...{}", driver(
        2, 40, 
        1
      ));
      
      println!("TEST-7...{}", driver(
        20, 79, 
        1
      ));
      
      println!("TEST-8...{}", driver(
        96, 98, 
        1
      ));
      
      println!("TEST-9...{}", driver(
        25, 5, 
        1
      ));
      
  }
source_py: def check_if_a_number_is_power_of_another_number_1(x, y):
      res1 = (math.log(y) / math.log(x))
      res2 = (math.log(y) / math.log(x))
      return (1 if (res1 == res2) else 0)
source_cpp: bool check_if_a_number_is_power_of_another_number_1(int x, int y) {
    int res1 = log ( y ) / log ( x );
    double res2 = log ( y ) / log ( x );
    return ( res1 == res2 );
  }