title: Check If A Number Is Power Of Another Number 1
signature: fun checkIfANumberIsPowerOfAnotherNumber1(x: Int, y: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(x: Int, y: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(x, y), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(57, 1, 1)
      println("TEST-0...${result}")
      
      result = driver(3, 9, 1)
      println("TEST-1...${result}")
      
      result = driver(10, 101, 1)
      println("TEST-2...${result}")
      
      result = driver(10, 10000, 1)
      println("TEST-3...${result}")
      
      result = driver(6, 46656, 1)
      println("TEST-4...${result}")
      
      result = driver(2, 2048, 1)
      println("TEST-5...${result}")
      
      result = driver(2, 40, 1)
      println("TEST-6...${result}")
      
      result = driver(20, 79, 1)
      println("TEST-7...${result}")
      
      result = driver(96, 98, 1)
      println("TEST-8...${result}")
      
      result = driver(25, 5, 1)
      println("TEST-9...${result}")
      
          
  }
  
  main()
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 );
  }