title: Check If A Number Is Power Of Another Number
signature: checkIfANumberIsPowerOfAnotherNumber :: Integer -> Integer -> Bool
  checkIfANumberIsPowerOfAnotherNumber x y = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> Bool -> String
  driver x y expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME x y) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (57) (1) (True) )
  
      printf "TEST-1...%s\n" (driver (3) (9) (True) )
  
      printf "TEST-2...%s\n" (driver (10) (101) (False) )
  
      printf "TEST-3...%s\n" (driver (10) (10000) (True) )
  
      printf "TEST-4...%s\n" (driver (6) (46656) (True) )
  
      printf "TEST-5...%s\n" (driver (2) (2048) (True) )
  
      printf "TEST-6...%s\n" (driver (1) (40) (False) )
  
      printf "TEST-7...%s\n" (driver (20) (79) (False) )
  
      printf "TEST-8...%s\n" (driver (96) (98) (False) )
  
      printf "TEST-9...%s\n" (driver (25) (5) (False) )
  
source_py: def check_if_a_number_is_power_of_another_number(x, y):
      if (x == 1):
          return (y == 1)
      pow = 1
      while (pow < y):
          pow = (pow * x)
      return (pow == y)
source_cpp: bool check_if_a_number_is_power_of_another_number(int x, long int y) {
    if ( x == 1 ) return ( y == 1 );
    long int pow = 1;
    while ( pow < y ) pow *= x;
    return ( pow == y );
  }