title: Check If A Number Is Power Of Another Number 1
signature: def checkIfANumberIsPowerOfAnotherNumber1(x: Int, y: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(x: Int, y: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(x, y),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        57, 1, 
        1    
      )}")   
  
  
      println(s"TEST-1...${driver(
        3, 9, 
        1    
      )}")   
  
  
      println(s"TEST-2...${driver(
        10, 101, 
        1    
      )}")   
  
  
      println(s"TEST-3...${driver(
        10, 10000, 
        1    
      )}")   
  
  
      println(s"TEST-4...${driver(
        6, 46656, 
        1    
      )}")   
  
  
      println(s"TEST-5...${driver(
        2, 2048, 
        1    
      )}")   
  
  
      println(s"TEST-6...${driver(
        2, 40, 
        1    
      )}")   
  
  
      println(s"TEST-7...${driver(
        20, 79, 
        1    
      )}")   
  
  
      println(s"TEST-8...${driver(
        96, 98, 
        1    
      )}")   
  
  
      println(s"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 );
  }