title: Find Unit Digit X Raised Power Y 1
signature: findUnitDigitXRaisedPowerY1(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(
          37, 17, 
          7)
      }");
  
      print("TEST-1...${driver(
          70, 52, 
          0)
      }");
  
      print("TEST-2...${driver(
          26, 23, 
          6)
      }");
  
      print("TEST-3...${driver(
          9, 96, 
          1)
      }");
  
      print("TEST-4...${driver(
          82, 71, 
          8)
      }");
  
      print("TEST-5...${driver(
          95, 36, 
          5)
      }");
  
      print("TEST-6...${driver(
          43, 40, 
          1)
      }");
  
      print("TEST-7...${driver(
          7, 27, 
          3)
      }");
  
      print("TEST-8...${driver(
          19, 56, 
          1)
      }");
  
      print("TEST-9...${driver(
          49, 28, 
          1)
      }");
  
      return 0;
  }
source_py: def find_unit_digit_x_raised_power_y_1(x, y):
      x = (x % 10)
      if (y != 0):
          y = ((y % 4) + 4)
      return (int(math.pow(x, y)) % 10)
source_cpp: int find_unit_digit_x_raised_power_y_1(int x, int y) {
    x = x % 10;
    if ( y != 0 ) y = y % 4 + 4;
    return ( ( ( int ) ( pow ( x, y ) ) ) % 10 );
  }