title: Find Unit Digit X Raised Power Y
signature: function findUnitDigitXRaisedPowerY($x, $y) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($x, $y, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($x, $y), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        33, 55, 
        7));
      
      printf("TEST-1...%s\n",driver(
        95, 7, 
        5));
      
      printf("TEST-2...%s\n",driver(
        21, 63, 
        1));
      
      printf("TEST-3...%s\n",driver(
        3, 62, 
        9));
      
      printf("TEST-4...%s\n",driver(
        40, 53, 
        0));
      
      printf("TEST-5...%s\n",driver(
        64, 24, 
        6));
      
      printf("TEST-6...%s\n",driver(
        17, 23, 
        3));
      
      printf("TEST-7...%s\n",driver(
        58, 74, 
        4));
      
      printf("TEST-8...%s\n",driver(
        44, 13, 
        4));
      
      printf("TEST-9...%s\n",driver(
        27, 54, 
        9));
      
  }
  
  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;
  }