title: Check If A Number Is Power Of Another Number 1
signature: checkIfANumberIsPowerOfAnotherNumber1(x, y) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(x, y, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(x, y), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          57, 1, 
          1)
      }");
  
      print("TEST-1...${driver(
          3, 9, 
          1)
      }");
  
      print("TEST-2...${driver(
          10, 101, 
          1)
      }");
  
      print("TEST-3...${driver(
          10, 10000, 
          1)
      }");
  
      print("TEST-4...${driver(
          6, 46656, 
          1)
      }");
  
      print("TEST-5...${driver(
          2, 2048, 
          1)
      }");
  
      print("TEST-6...${driver(
          2, 40, 
          1)
      }");
  
      print("TEST-7...${driver(
          20, 79, 
          1)
      }");
  
      print("TEST-8...${driver(
          96, 98, 
          1)
      }");
  
      print("TEST-9...${driver(
          25, 5, 
          1)
      }");
  
      return 0;
  }
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 );
  }