title: Find Unit Digit X Raised Power Y
signature: function findUnitDigitXRaisedPowerY(x, y) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(x, y, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(x, y),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(33, 55, 7);
    console.log(`TEST-0...${result}`);
  
    result = driver(95, 7, 5);
    console.log(`TEST-1...${result}`);
  
    result = driver(21, 63, 1);
    console.log(`TEST-2...${result}`);
  
    result = driver(3, 62, 9);
    console.log(`TEST-3...${result}`);
  
    result = driver(40, 53, 0);
    console.log(`TEST-4...${result}`);
  
    result = driver(64, 24, 6);
    console.log(`TEST-5...${result}`);
  
    result = driver(17, 23, 3);
    console.log(`TEST-6...${result}`);
  
    result = driver(58, 74, 4);
    console.log(`TEST-7...${result}`);
  
    result = driver(44, 13, 4);
    console.log(`TEST-8...${result}`);
  
    result = driver(27, 54, 9);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    main();
  }
source_py: def find_unit_digit_x_raised_power_y(x, y):
      res = 1
      for i in range(y):
          res = ((res * x) % 10)
      return res
source_cpp: int find_unit_digit_x_raised_power_y(int x, int y) {
    int res = 1;
    for ( int i = 0;
    i < y;
    i ++ ) res = ( res * x ) % 10;
    return res;
  }