title: Find Unit Digit X Raised Power Y
signature: function find_unit_digit_x_raised_power_y(x, y)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(x, y, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(x, y), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(33, 55, 7);
      @printf("TEST-0...%s\n",result);
      
      result = driver(95, 7, 5);
      @printf("TEST-1...%s\n",result);
      
      result = driver(21, 63, 1);
      @printf("TEST-2...%s\n",result);
      
      result = driver(3, 62, 9);
      @printf("TEST-3...%s\n",result);
      
      result = driver(40, 53, 0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(64, 24, 6);
      @printf("TEST-5...%s\n",result);
      
      result = driver(17, 23, 3);
      @printf("TEST-6...%s\n",result);
      
      result = driver(58, 74, 4);
      @printf("TEST-7...%s\n",result);
      
      result = driver(44, 13, 4);
      @printf("TEST-8...%s\n",result);
      
      result = driver(27, 54, 9);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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;
  }