title: Find Unit Digit X Raised Power Y
signature: func findUnitDigitXRaisedPowerY(x int, y int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(x int, y int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(x, y),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(33, 
  	55, 7)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(95, 
  	7, 5)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(21, 
  	63, 1)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(3, 
  	62, 9)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(40, 
  	53, 0)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(64, 
  	24, 6)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(17, 
  	23, 3)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(58, 
  	74, 4)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(44, 
  	13, 4)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(27, 
  	54, 9)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }